77 lines
2.1 KiB
PHP
77 lines
2.1 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace app\api\controller;
|
||
|
|
|
||
|
|
use app\common\controller\Api;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 宝箱接口
|
||
|
|
*/
|
||
|
|
class NewBox extends Common
|
||
|
|
{
|
||
|
|
//开宝箱
|
||
|
|
public function open_new_box()
|
||
|
|
{
|
||
|
|
$tid = input('nbl_id', 0);
|
||
|
|
$open_num = input('pay_amount', 0);
|
||
|
|
$rid = input('rid', 0);
|
||
|
|
$reslut = model('NewBox')->open_new_box($this->uid, $tid, $open_num, $rid);
|
||
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
//获取奖池礼物列表
|
||
|
|
public function get_new_box_list()
|
||
|
|
{
|
||
|
|
$tid = input('tid', 0);
|
||
|
|
$rid = input('rid',1);
|
||
|
|
$reslut = model('NewBox')->get_new_box_list($this->uid);
|
||
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
public function get_new_box_list1()
|
||
|
|
{
|
||
|
|
$tid = input('tid', 0);
|
||
|
|
$rid = input('rid',1);
|
||
|
|
$reslut = model('NewBox')->get_new_box_list1($this->uid);
|
||
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
//获取开宝箱手气榜
|
||
|
|
public function get_new_box_win_user()
|
||
|
|
{
|
||
|
|
|
||
|
|
$box_type = input('box_type', 1);
|
||
|
|
$page = input('page', 1);
|
||
|
|
$limit = input('limit', 20);
|
||
|
|
$reslut = model('NewBox')->get_new_box_win_user($box_type, $page, $limit);
|
||
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
//获取用户开出礼物记录
|
||
|
|
public function get_my_new_box_log()
|
||
|
|
{
|
||
|
|
$page = input('page', 1);
|
||
|
|
$limit = input('limit', 20);
|
||
|
|
$box_type = input('box_type', 0);
|
||
|
|
$type = input('type', 1);
|
||
|
|
$reslut = model('NewBox')->get_my_new_box_log($this->uid, $box_type, $type, $page, $limit);
|
||
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
//获取宝箱说明
|
||
|
|
public function get_box_note()
|
||
|
|
{
|
||
|
|
$reslut = model('NewBox')->get_box_note();
|
||
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
//我的号码
|
||
|
|
public function get_my_box_num_sn()
|
||
|
|
{
|
||
|
|
$page = input('page', 0);
|
||
|
|
$page_limit = input('page_limit', 20);
|
||
|
|
$uid = $this->uid;
|
||
|
|
$nbl_id = input('nbl_id', 0);
|
||
|
|
$reslut = model('NewBox')->get_my_box_num_sn($uid, $nbl_id, $page, $page_limit);
|
||
|
|
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|