选择礼物时 部分不能选择CP礼物
This commit is contained in:
@@ -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