From f1a0e550325946ac60bcbab3cb341365974aed3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Sat, 30 Aug 2025 09:23:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A4=E5=8F=8B=E6=88=BF=20=20=E9=80=81?= =?UTF-8?q?=E7=A4=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/GiveGift.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/api/model/GiveGift.php b/application/api/model/GiveGift.php index 8fd36e4..3da2548 100644 --- a/application/api/model/GiveGift.php +++ b/application/api/model/GiveGift.php @@ -128,7 +128,7 @@ class GiveGift extends Model $gift_total = 0; $give_gift = 0; $gift_user_data = []; - foreach ($toarray as $to_id){ + foreach ($toarray as $k => $to_id){ $gift_user_data[]['user_id'] = $to_id; $gift_box1 = []; $gift_box = []; @@ -176,7 +176,7 @@ class GiveGift extends Model 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);