1
This commit is contained in:
parent
40adb32d0b
commit
083d192cde
@ -937,7 +937,8 @@ class BaseAuthedController extends BaseController {
|
||||
|
||||
public function _getVipRightsVal($type)
|
||||
{
|
||||
$vip = User::getVipLv(myself()->_getAddress());
|
||||
$details = \services\StakingVipService::getDetails(myself()->_getAddress());
|
||||
$vip = $details['lv'];
|
||||
return myself()->_callMtStatic('StakingVip', 'getValByLv', $vip, $type);
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ require_once('services/NameService.php');
|
||||
require_once('services/ChipPageService.php');
|
||||
require_once('services/LogService.php');
|
||||
require_once('services/NftService.php');
|
||||
require_once('services/StakingVipService.php');
|
||||
|
||||
use phpcommon\SqlHelper;
|
||||
use models\User;
|
||||
@ -1163,10 +1164,11 @@ class UserController extends BaseAuthedController {
|
||||
|
||||
public function getUserVip(){
|
||||
|
||||
$details = \services\StakingVipService::getDetails(myself()->_getAddress());
|
||||
$this->_rspData(
|
||||
array(
|
||||
'vip' => User::getVipLv(myself()->_getAddress()),
|
||||
'exp' => 0,
|
||||
'vip' => $details['lv'],
|
||||
'exp' => $details['cur'],
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -70,17 +70,7 @@ class User extends BaseModel {
|
||||
);
|
||||
return $rows ? $rows : null;
|
||||
}
|
||||
|
||||
public static function getVipLv($address){
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getMarketMysql(''),
|
||||
't_staking_cec',
|
||||
array(
|
||||
'account_address' => $address
|
||||
)
|
||||
);
|
||||
return $row ? $row['vip_lv'] : 0;
|
||||
}
|
||||
|
||||
|
||||
public static function show($row)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user