29 lines
854 B
PHP
29 lines
854 B
PHP
<?php
|
||
|
||
namespace app\api\controller;
|
||
|
||
use app\common\controller\BaseCom;
|
||
|
||
class GiftNew extends BaseCom
|
||
{
|
||
|
||
/*
|
||
* 获取礼物列表
|
||
* @param int $label 礼物标签
|
||
* @param int $type 类型:1-房间送礼礼物,2-排麦设置插麦礼物,3-拍卖位选择拍卖礼物,4-歌手添加歌单礼物,5-动态打赏礼物
|
||
* @return array
|
||
*/
|
||
public function get_gift_list()
|
||
{
|
||
$key_name = "api:gift_new:get_gift_list:" . $this->uid;
|
||
redis_lock_exits($key_name);
|
||
$label = input('label', 0);
|
||
$type = input('type');
|
||
if (empty($type)) {
|
||
return V(0, 'type参数错误');
|
||
}
|
||
$reslut = model('GiftNew')->get_gift_list($this->uid, $type, $label);
|
||
redis_unlocks($key_name);
|
||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||
}
|
||
} |