房间热度卡开发-礼物列表调整
This commit is contained in:
@@ -19,7 +19,8 @@ class Gift extends BaseCom
|
||||
{
|
||||
$no_label = input('no_label','');
|
||||
$no_label = explode(',',$no_label);
|
||||
$reslut = model('Gift')->get_gift_label($no_label);
|
||||
$type = input('type',1);
|
||||
$reslut = model('Gift')->get_gift_label($type,$no_label);
|
||||
return V($reslut['code'],$reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class Gift extends Model
|
||||
protected $table = 'fa_vs_gift';
|
||||
|
||||
//获取礼物类型
|
||||
public function get_gift_label($no_label = [])
|
||||
public function get_gift_label($type,$no_label = [])
|
||||
{
|
||||
$giftType = [];
|
||||
//礼物
|
||||
@@ -33,9 +33,11 @@ class Gift extends Model
|
||||
$giftType[$key]['name'] = $value['name'];
|
||||
$giftType[$key]['sort'] = $value['sort'];
|
||||
}
|
||||
//增加房间热度卡
|
||||
if(!in_array(1013,$no_label)){
|
||||
$giftType[] = ['id' => 1013, 'name' => '房间热度卡', 'sort' => 0];
|
||||
if($type == 2) {//打赏 不需要热度卡
|
||||
//增加房间热度卡
|
||||
if (!in_array(1013, $no_label)) {
|
||||
$giftType[] = ['id' => 1013, 'name' => '房间热度卡', 'sort' => 0];
|
||||
}
|
||||
}
|
||||
//排序 1013排到最前面去
|
||||
usort($giftType, function($a, $b) {
|
||||
@@ -101,7 +103,8 @@ class Gift extends Model
|
||||
if ($label == 99) {
|
||||
$gift_price = get_system_config_value('room_love_auction_cion');
|
||||
$where['gift_price'] = ['>',$gift_price];
|
||||
$where['label'] = ['<>',2];
|
||||
// $where['label'] = ['<>',2];
|
||||
$where['label'] = ['in',[1,5]];
|
||||
}
|
||||
|
||||
$is_open_blind_box_turntable = 1;
|
||||
|
||||
Reference in New Issue
Block a user