From c1e567ddda7f65651179a8a73ca849b07b066b14 Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期四, 19 六月 2025 19:58:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- 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