交友房 送礼

This commit is contained in:
2025-08-30 09:23:00 +08:00
parent 44050a6128
commit f1a0e55032

View File

@@ -128,7 +128,7 @@ class GiveGift extends Model
$gift_total = 0; $gift_total = 0;
$give_gift = 0; $give_gift = 0;
$gift_user_data = []; $gift_user_data = [];
foreach ($toarray as $to_id){ foreach ($toarray as $k => $to_id){
$gift_user_data[]['user_id'] = $to_id; $gift_user_data[]['user_id'] = $to_id;
$gift_box1 = []; $gift_box1 = [];
$gift_box = []; $gift_box = [];
@@ -176,7 +176,7 @@ class GiveGift extends Model
return ['code' => 0, 'msg' => '送礼失败', 'data' => null]; return ['code' => 0, 'msg' => '送礼失败', 'data' => null];
} }
} }
$gift_user_data[]['gift_price'] = $gift_price; $gift_user_data[$k]['gift_price'] = $gift_price;
//计算收礼人得益 //计算收礼人得益
$receiver_earnings = $this -> receiver_earnings($to_id,$gift_price,$from_type); $receiver_earnings = $this -> receiver_earnings($to_id,$gift_price,$from_type);