From badbfb7511dde67d66fa98383d6ca9e35244e27d Mon Sep 17 00:00:00 2001 From: lqmac Date: Mon, 21 Oct 2024 15:20:33 +0800 Subject: [PATCH] 1 --- app/api/controller/Goods.php | 2 +- app/api/controller/sharp/Goods.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/controller/Goods.php b/app/api/controller/Goods.php index 9e3f126b..9a52f89a 100644 --- a/app/api/controller/Goods.php +++ b/app/api/controller/Goods.php @@ -96,7 +96,7 @@ class Goods extends Controller $jd = new Jd(); $jd_short_url = $jd->getJdShortLink($goodsInfo['goods_no']); //获取商品短链 - $goodsInfo['jd_short_url'] = $jd_short_url; + $goodsInfo['jd_short_url'] = $jd_short_url[0]['link'] ?? ""; return $this->renderSuccess(['detail' => $goodsInfo]); } diff --git a/app/api/controller/sharp/Goods.php b/app/api/controller/sharp/Goods.php index 1ccc9374..524d159e 100644 --- a/app/api/controller/sharp/Goods.php +++ b/app/api/controller/sharp/Goods.php @@ -69,7 +69,7 @@ class Goods extends Controller //京东短链 $jd = new Jd(); $jd_short_url = $jd->getJdShortLink($data['goods']['goods_no']); - $data['goods']['jd_short_url'] = $jd_short_url; + $data['goods']['jd_short_url'] = $jd_short_url[0]['link'] ?? ""; return $this->renderSuccess($data); }