This commit is contained in:
hujiabin 2024-10-14 16:41:29 +08:00
parent 63245ebcc7
commit 8655dae204
3 changed files with 20 additions and 3 deletions

View File

@ -221,5 +221,18 @@ class User(object):
_common.RspHead(),
['info',_common.UserInfo(), '用户信息'],
]
},{
'name': 'getUserVip',
'desc': '用户VIP',
'group': 'User',
'url': 'webapp/index.php?c=User&a=getUserVip',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['vip',0, 'vip等级'],
['exp',0, 'vip经验'],
]
},
]

View File

@ -1152,7 +1152,13 @@ class UserController extends BaseAuthedController {
}
}
public function getMyVip(){
public function getUserVip(){
$this->_rspData(
array(
'vip' => User::getVipLv(myself()->_getAddress()),
'exp' => 0,
)
);
}
}

View File

@ -141,7 +141,6 @@ class User extends BaseModel {
'honor_info' => $honorInfo,
'account_lucky' => $lucky,
'chest_rate' => $rate,
'vip_lv' => self::getVipLv($row['address']),
);
}
@ -207,7 +206,6 @@ class User extends BaseModel {
'last_login_time' => $row['last_login_time'],
'account_lucky' => $lucky,
'chest_rate' => $rate,
'vip_lv' => self::getVipLv($row['address']),
);
}