43 lines
1.3 KiB
PHP
43 lines
1.3 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
|
||
|
|
namespace app\api\controller;
|
||
|
|
|
||
|
|
|
||
|
|
class BlindBox extends Common
|
||
|
|
{
|
||
|
|
//活动初始化数据
|
||
|
|
public function blind_box_init()
|
||
|
|
{
|
||
|
|
$uid = $this->uid;
|
||
|
|
$to_uid = input('to_uid', 0);
|
||
|
|
$gid = input('gid', 0);
|
||
|
|
$result = model('api/BlindBox')->blind_box_init($uid, $to_uid, $gid);
|
||
|
|
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||
|
|
}
|
||
|
|
public function get_blind_box_rank()
|
||
|
|
{
|
||
|
|
$uid = $this->uid;
|
||
|
|
$page = input('page', 1);
|
||
|
|
$page_limit = input('page_limit', 20);
|
||
|
|
$time_type = input('time_type', 1);
|
||
|
|
$result = model('api/BlindBox')->get_blind_box_rank($time_type, $page, $page_limit);
|
||
|
|
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||
|
|
}
|
||
|
|
//中奖记录
|
||
|
|
public function get_blind_box_win_log()
|
||
|
|
{
|
||
|
|
$uid = $this->uid;
|
||
|
|
$page = input('page', 1);
|
||
|
|
$page_limit = input('page_limit', 20);
|
||
|
|
$result = model('api/BlindBox')->get_blind_box_win_log($page, $page_limit);
|
||
|
|
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||
|
|
}
|
||
|
|
//玩法介绍
|
||
|
|
public function get_blind_box_note()
|
||
|
|
{
|
||
|
|
$result = model('api/BlindBox')->get_blind_box_note();
|
||
|
|
return ajaxReturn($result['code'], $result['msg'], $result['data']);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|