From 35a3bccaa12309d337e84db75ae344962e55607a Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期二, 17 六月 2025 18:50:27 +0800
Subject: [PATCH] update 调整商品分类为单列

---
 manager/src/views/goods/goods-info/goodsDetail.vue |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/manager/src/views/goods/goods-info/goodsDetail.vue b/manager/src/views/goods/goods-info/goodsDetail.vue
index 60d4c41..af66491 100644
--- a/manager/src/views/goods/goods-info/goodsDetail.vue
+++ b/manager/src/views/goods/goods-info/goodsDetail.vue
@@ -143,6 +143,7 @@
 </template>
 <script>
 import { getGoodsDetail } from "@/api/goods";
+import {getSts} from '@/api/file'
 export default {
   name: "goodsDetail",
   data() {
@@ -193,6 +194,26 @@
     initGoods(id) {
       getGoodsDetail(id).then((res) => {
         this.goods = res.result;
+        if (this.goods.goodsVideo != null && this.goods.goodsVideo !== '') {
+          getSts().then(res => {
+            console.log('--------------->',this.goods.goodsVideo.indexOf('http')!== -1)
+            if (this.goods.goodsVideo !== null && this.goods.goodsVideo.indexOf('http')=== -1) {
+              this.goods.goodsVideo = res.data.endpoint+'/'+this.goods.goodsVideo;
+            }
+          })
+        }
+        if (this.goods.goodsGalleryList != null && this.goods.goodsGalleryList.length > 0) {
+          getSts().then(res => {
+            this.goods.goodsGalleryList =  this.goods.goodsGalleryList.map((item) => {
+              if (item !== null&&item.indexOf('http')===-1) {
+                return  res.data.endpoint+'/'+item;
+              }else {
+                return item;
+              }
+            })
+          })
+        }
+
         let that = this;
         res.result.skuList.forEach(function (sku, index, array) {
           that.skuData.push({

--
Gitblit v1.8.0