Files
yusheng-php/application/api/controller/GiftNew.php

29 lines
854 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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']);
}
}