爆币
This commit is contained in:
@@ -189,7 +189,8 @@ class Room extends BaseCom
|
||||
$pit_number = input('pit_number', 0);
|
||||
$heart_id = input('heart_id', 0);
|
||||
|
||||
if($gift_id == 88){
|
||||
$pool_gift_id = db::name('bb_lottery_config')->where(['key' => 'pool_gift_id'])->value('value');
|
||||
if($gift_id == $pool_gift_id){
|
||||
$reslut = model('Lottery')->gift($this->uid, $to_uid, $gift_id, $room_id,$gift_num);
|
||||
}else{
|
||||
$reslut = model('Room')->room_gift($this->uid, $to_uid, $gift_id, $gift_num, $type, $room_id, $pit_number,$heart_id);
|
||||
|
||||
@@ -23,8 +23,11 @@ class Lottery extends Model
|
||||
if(in_array($send_uid,$toarray)){
|
||||
return ['code' => 0, 'msg' => '收礼人不能包含自己', 'data' => null];
|
||||
}
|
||||
|
||||
//获取礼物信息
|
||||
$gift_info = Db::name('vs_gift')->where(['gid'=>$gift_id])
|
||||
->field('gid as gift_id,gift_name,gift_price,file_type,base_image,play_image,gift_type,label,is_public_server')->find();
|
||||
|
||||
//送给所有人的总价格
|
||||
$all_gift_price = $gift_info['gift_price'] * $num * count($toarray);
|
||||
//判断是否有足够的金币
|
||||
|
||||
Reference in New Issue
Block a user