选择礼物时 部分不能选择CP礼物
This commit is contained in:
@@ -29,6 +29,11 @@ class RoomAuction extends BaseCom
|
||||
$room_id = input('room_id');
|
||||
$user_id = input('user_id');
|
||||
$gift_id = input('gift_id');
|
||||
//礼物不能是CP礼物
|
||||
$cp_gift_ids = explode(',', get_system_config_value('cp_gift_id'));
|
||||
if (in_array($gift_id, $cp_gift_ids)) {
|
||||
return ['code' => 0, 'msg' => '礼物不能是CP礼物,请重新选择', 'data' => null];
|
||||
}
|
||||
$relation_id = input('relation_id','');
|
||||
$auction_type = input('auction_type',1);//1真爱拍 2 亲密拍
|
||||
$time_day = input('time_day', 0);//小时
|
||||
|
||||
@@ -819,6 +819,12 @@ class RoomPit extends Model
|
||||
if(!$gift_id){
|
||||
return ['code' => 0, 'msg' => '请选择礼物', 'data' => null];
|
||||
}
|
||||
//礼物不能是CP礼物
|
||||
$cp_gift_ids = explode(',', get_system_config_value('cp_gift_id'));
|
||||
if (in_array($gift_id, $cp_gift_ids)) {
|
||||
return ['code' => 0, 'msg' => '礼物不能是CP礼物,请重新选择', 'data' => null];
|
||||
}
|
||||
|
||||
if(!$gift_price){
|
||||
$gift_price = db::name('vs_gift')->where(['gid' => $gift_id])->value('gift_price');
|
||||
}
|
||||
|
||||
@@ -79,6 +79,13 @@ class SingerSong extends Model
|
||||
if ($res) {
|
||||
return ['code' => 0, 'msg' => '请勿重复提交歌曲', 'data' => null];
|
||||
}
|
||||
|
||||
//礼物不能是CP礼物
|
||||
$cp_gift_ids = explode(',', get_system_config_value('cp_gift_id'));
|
||||
if (in_array($gift_id, $cp_gift_ids)) {
|
||||
return ['code' => 0, 'msg' => '礼物不能是CP礼物,请重新选择', 'data' => null];
|
||||
}
|
||||
|
||||
$data = [
|
||||
'user_id' => $user_id,
|
||||
'song_name' => $song_name,
|
||||
|
||||
Reference in New Issue
Block a user