浏览代码

bug修复

chenrui 3 年之前
父节点
当前提交
7527692a18
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      src/views/productManagement/productInfo/detailModal.vue

+ 6 - 2
src/views/productManagement/productInfo/detailModal.vue

@@ -22,7 +22,7 @@
         <a-descriptions-item label="产品图片:" :span="2">
           <div style="display: flex;">
             <p class="pic-box" v-for="(item,index) in fileList" :key="index">
-              <img :src="item" title="点击查看大图" class="productPic" @click="getPreview(item)" />
+              <img :src="item.imageUrl" title="点击查看大图" class="productPic" @click="getPreview(item.imageUrl)" />
             </p>
           </div>
           <span v-if="fileList.length == 0">--</span>
@@ -85,7 +85,11 @@ export default {
       productSnDetail({ sn: this.itemSn }).then(res => {
         if (res.status == 200) {
           this.detailsData = res.data
-          this.fileList = res.data.productMsg ? res.data.productMsg.split(',') : []
+          if (res.data && res.data.productPicList && res.data.productPicList.length > 0) {
+            this.fileList = res.data.productPicList
+          } else {
+            this.fileList = []
+          }
         } else {
           this.detailsData = null
         }