代码初始化
This commit is contained in:
39
application/api/controller/Level.php
Normal file
39
application/api/controller/Level.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?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']);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user