等级修改bug修改 跟新等级取值错误

This commit is contained in:
2025-09-23 23:03:42 +08:00
parent fa3c0f648c
commit f19efd80ea

View File

@@ -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 = [];