代码初始化
This commit is contained in:
47
application/api/controller/UserGiftPack.php
Normal file
47
application/api/controller/UserGiftPack.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\controller\BaseCom;
|
||||
use think\Controller;
|
||||
/*
|
||||
* 每日任务
|
||||
*
|
||||
*/
|
||||
class UserGiftPack extends BaseCom
|
||||
{
|
||||
//初始化
|
||||
protected function initialize()
|
||||
{
|
||||
//允许跨域
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
}
|
||||
//获取背包礼物列表
|
||||
public function get_gift_pack_list()
|
||||
{
|
||||
$user_id = $this->uid;
|
||||
$reslut = model('UserGiftPack')->get_gift_pack_list($user_id);
|
||||
return V($reslut['code'],$reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//背包收入
|
||||
public function get_gift_pack_income()
|
||||
{
|
||||
$user_id = $this->uid;
|
||||
$page = input('page',1);
|
||||
$page_limit = input('page_limit',10);
|
||||
$reslut = model('UserGiftPack')->income_user_gift_pack($user_id,$page=1,$page_limit=10);
|
||||
return V($reslut['code'],$reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//背包礼物支出
|
||||
public function get_gift_pack_outcome()
|
||||
{
|
||||
$user_id = $this->uid;
|
||||
$page = input('page',1);
|
||||
$page_limit = input('page_limit',10);
|
||||
$reslut = model('UserGiftPack')->get_gift_pack_outcome($user_id,$page=1,$page_limit=10);
|
||||
return V($reslut['code'],$reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user