diff --git a/application/api/model/Level.php b/application/api/model/Level.php index 2dd172b..01e604a 100644 --- a/application/api/model/Level.php +++ b/application/api/model/Level.php @@ -292,7 +292,7 @@ class Level extends Model $user_wealth_exp = $user['wealth_exp'] + $wealth_exp; //判断是否达到下一级别 $user_wealth = $this->get_wealth_level_to_level($user_wealth_level); - if($user_wealth_exp>= $user_wealth['exp']){ + if($user_wealth_exp>= $user_wealth['next_level_exp']){ $user_wealth_level= $user_wealth['next_level']; } $update_data = []; @@ -302,7 +302,7 @@ class Level extends Model $return = db('user_data')->where('user_id',$uid)->update($update_data); if($return){ //发放特权礼物 - if($user_wealth_exp>= $user_wealth['exp']){ + if($user_wealth_exp>= $user_wealth['next_level_exp']){ $wealth_level_rights = db('vs_wealth_level_rights')->where('level_id',$user_wealth_level)->find(); if(isset($wealth_level_rights['type']) && $wealth_level_rights['type'] ==1 ){//发座驾礼物 $log_remark = "财富等级达到".$user_wealth_level."级 发放座驾礼物"; @@ -322,7 +322,7 @@ class Level extends Model $user_charm_exp = $user['charm_exp'] + $charm_exp; //判断是否达到下一级别 $user_charm = $this->get_charm_level_to_level($user_charm_level); - if($user_charm_exp>= $user_charm['exp']){ + if($user_charm_exp>= $user_charm['next_level_exp']){ $user_charm_level= $user_charm['next_level']; } $update_data = [];