zxl
2025-07-11 9069768170942a641fa57f269686c6ed3faf09da
manager/src/views/goods/goods-info/goodsDetail.vue
@@ -78,6 +78,8 @@
                controls
                class="player"
                :src="goods.goodsVideo"
                width="200"
                height="180"
              />
            </FormItem>
            <FormItem label="商品规格">
@@ -143,6 +145,7 @@
</template>
<script>
import { getGoodsDetail } from "@/api/goods";
import {getSts} from '@/api/file'
export default {
  name: "goodsDetail",
  data() {
@@ -193,6 +196,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({