From 8d2b5223451998bd82e7f9b4e98e0ec8874244cc Mon Sep 17 00:00:00 2001 From: ctexthuang Date: Mon, 31 Mar 2025 17:12:51 +0800 Subject: [PATCH] fix : coupon --- app/Service/ServiceTrait/Api/OrderTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Service/ServiceTrait/Api/OrderTrait.php b/app/Service/ServiceTrait/Api/OrderTrait.php index 6d7f7ef..e5659b1 100644 --- a/app/Service/ServiceTrait/Api/OrderTrait.php +++ b/app/Service/ServiceTrait/Api/OrderTrait.php @@ -260,7 +260,7 @@ trait OrderTrait protected function computePrice(): void { $this->orderRes['good_ids'] = $this->cartSecondData; - +// var_dump($this->skuArr); foreach ($this->cartSecondData as $oneCopies) { $oneCopiesTotalPrice = '0.00'; @@ -272,7 +272,7 @@ trait OrderTrait if (empty($oneCopiesGoodInfo[$key])) { $oneCopiesGoodInfo[$key] = [ 'num' => $oneGood, - 'good_name' => $this->skuArr[$key]['spu_title'] ?? '' . $this->skuArr[$key]['title'] ?? '', + 'good_name' => ($this->skuArr[$key]['spu_title'] ?? '').'-'.($this->skuArr[$key]['title'] ?? ''), 'good_url' => $this->skuArr[$key]['url'] ?? '', 'unit_price' => $this->skuArr[$key]['price'], 'type' => $this->skuArr[$key]['type'],