From 97780cb2f9c097f35e5310d0ecc641224b77df92 Mon Sep 17 00:00:00 2001 From: Edward Yang Date: Wed, 17 Aug 2022 18:56:19 +0800 Subject: [PATCH] fixed wish list https://guangdagit.com/beike/beikeshop/issues/102 --- beike/Shop/Http/Resources/Account/WishlistDetail.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beike/Shop/Http/Resources/Account/WishlistDetail.php b/beike/Shop/Http/Resources/Account/WishlistDetail.php index ea9f2941..d6d4cd2a 100644 --- a/beike/Shop/Http/Resources/Account/WishlistDetail.php +++ b/beike/Shop/Http/Resources/Account/WishlistDetail.php @@ -23,12 +23,13 @@ class WishlistDetail extends JsonResource $product = $this->product; $masterSku = $product->master_sku; $image = $this->product->image ?: $masterSku->image; + $productName = $product->description->name ?? ''; $data = [ 'id' => $this->id, 'product_id' => $this->product_id, 'image' => image_resize($image), - 'product_name' => $product->description->name, + 'product_name' => sub_string($productName,24), 'price' => currency_format($masterSku->price) ];