diff --git a/application/adminapi/controller/Banner.php b/application/adminapi/controller/Banner.php index 8e9180e..84f60f3 100644 --- a/application/adminapi/controller/Banner.php +++ b/application/adminapi/controller/Banner.php @@ -151,7 +151,7 @@ class Banner extends adminApi $image = input('image', ''); $show_status = input('show_status', ''); $remarks = input('remarks', ''); - $content = input('content', ''); + $content =$_POST['content']??""; if (!$id){ return V(0,"ID不能为空"); } diff --git a/application/api/model/Level.php b/application/api/model/Level.php index f9ac425..49a071d 100644 --- a/application/api/model/Level.php +++ b/application/api/model/Level.php @@ -53,7 +53,8 @@ class Level extends Model //距离下个等级需要的经验 $return['user']['next_level'] = $user['charm_level']+1; $return['user']['next_level_str'] = 'Lv.'.$return['user']['next_level']; - $return['user']['next_exp'] = $user_level['next_level_exp'] - $user['wealth_exp']; + $next_exp = $user_level['next_level_exp'] - $user['wealth_exp']; + $return['user']['next_exp'] = $next_exp <= 0 ? 0 : $next_exp; $return['user']['next_rights_icon'] = $user_level['next_rights_icon']; } @@ -142,7 +143,8 @@ class Level extends Model //距离下个等级需要的经验 $return['user']['next_level'] = $user['wealth_level']+1; $return['user']['next_level_str'] = 'Lv.'.$return['user']['next_level']; - $return['user']['next_exp'] = $user_level['next_level_exp'] - $user['wealth_exp']; + $next_exp = $user_level['next_level_exp'] - $user['wealth_exp']; + $return['user']['next_exp'] = $next_exp <= 0 ? 0 : $next_exp; $return['user']['next_coins'] = $user_level['next_coins']; } //获取等级