送盲盒
This commit is contained in:
@@ -810,6 +810,7 @@ class SendGift extends Model
|
||||
|
||||
//查询礼物是否是盲盒
|
||||
if($gift_info['label'] == 2){//趣味礼物(盲盒)
|
||||
$gift_box_map = [];
|
||||
for($i = 0; $i < $num; $i++){
|
||||
//开盲盒
|
||||
$gift_box1[$i] = $this -> open_box($gid,$uid,$to_uid,$room_id,$gift_bag_id);
|
||||
@@ -1022,6 +1023,8 @@ class SendGift extends Model
|
||||
// 统计相同礼物的数量
|
||||
$giftCount = [];
|
||||
foreach ($gift_box as $key=>$gv) {
|
||||
$gift_info = Db::name('vs_gift')->where(['gid'=>$gv['gift_id']])
|
||||
->field('gid as gift_id,gift_name,gift_price,file_type,base_image,play_image,gift_type,label,is_public_server')->find();
|
||||
if (isset($giftCount[$gv['gift_id']])) {
|
||||
$giftCount[$gv['gift_id']]['count']++;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user