mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-05-22 06:49:15 +08:00
Update Center.php
This commit is contained in:
parent
3365a81e69
commit
404bbeb51c
@ -3,6 +3,7 @@
|
|||||||
namespace app\data\controller\api\auth;
|
namespace app\data\controller\api\auth;
|
||||||
|
|
||||||
use app\data\controller\api\Auth;
|
use app\data\controller\api\Auth;
|
||||||
|
use app\data\service\RebateService;
|
||||||
use app\data\service\UserUpgradeService;
|
use app\data\service\UserUpgradeService;
|
||||||
use app\data\service\UserAdminService;
|
use app\data\service\UserAdminService;
|
||||||
use think\admin\Storage;
|
use think\admin\Storage;
|
||||||
@ -99,6 +100,21 @@ class Center extends Auth
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户等级
|
||||||
|
*/
|
||||||
|
public function levels()
|
||||||
|
{
|
||||||
|
$levels = UserUpgradeService::instance()->levels();
|
||||||
|
foreach ($levels as &$level) {
|
||||||
|
$level['prizes'] = [];
|
||||||
|
foreach (str2arr($level['rebate_rule']) as $code) {
|
||||||
|
$level['prizes'][$code] = RebateService::instance()->name($code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->success('获取用户等级', array_values($levels));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取我邀请的朋友
|
* 获取我邀请的朋友
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
|
Loading…
x
Reference in New Issue
Block a user