40 lines
971 B
PHP
40 lines
971 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace app\api\controller;
|
||
|
|
|
||
|
|
use app\common\controller\BaseCom;
|
||
|
|
use think\Controller;
|
||
|
|
use think\Db;
|
||
|
|
|
||
|
|
class Level extends BaseCom
|
||
|
|
{
|
||
|
|
//初始化
|
||
|
|
protected function initialize()
|
||
|
|
{
|
||
|
|
//允许跨域
|
||
|
|
header('Access-Control-Allow-Origin: *');
|
||
|
|
}
|
||
|
|
//魅力等级规则说明
|
||
|
|
public function get_level_rule()
|
||
|
|
{
|
||
|
|
$uid = $this->uid;
|
||
|
|
$reslut = model('Level')->get_level_rule($uid);
|
||
|
|
return V($reslut['code'],$reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
//财富等级规则说明
|
||
|
|
public function get_wealth_rule(){
|
||
|
|
$uid = $this->uid;
|
||
|
|
$reslut = model('Level')->get_wealth_rule($uid);
|
||
|
|
return V($reslut['code'],$reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
//领取金币奖励
|
||
|
|
public function get_gold_reward(){
|
||
|
|
$uid = $this->uid;
|
||
|
|
$reslut = model('Level')->get_wealth_level_reward($uid);
|
||
|
|
return V($reslut['code'],$reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|