lushixing 3 weeks ago
parent
commit
33c6dac86d

+ 4 - 4
src/views/design-agent/components/productRepoModal.vue

@@ -37,8 +37,8 @@
               <el-table-column label="商品ID" min-width="100" align="center" prop="productId" />
               <el-table-column label="商品图片" min-width="100" align="center">
                 <template slot-scope="scope">
-                  <p style="margin: 0; padding: 0; cursor: pointer;" v-if="scope.row.productImageUrls && scope.row.productImageUrls.length" @click="handleImageList(scope.row)">
-                    <img style="max-width: 100px;" :src="scope.row.productImageUrls[0]"  alt="">
+                  <p style="margin: 0; padding: 0; cursor: pointer;" v-if="scope.row.mainPicture && scope.row.mainPicture.length" @click="handleImageList(scope.row)">
+                    <img style="max-width: 100px;" :src="scope.row.mainPicture[0]"  alt="">
                   </p>
                 </template>
               </el-table-column>
@@ -146,9 +146,9 @@ export default {
       this.dialogVisible = false;
     },
     handleImageList(row) {
-      if (row.productImageUrls && row.productImageUrls.length) {
+      if (row.mainPicture && row.mainPicture.length) {
         this.showImageList = true;
-        this.currentImageList = row.productImageUrls.map(acc => {
+        this.currentImageList = row.mainPicture.map(acc => {
           const isChecked = this.chooseImageList.filter(item => item == acc)
           return {
             url: acc,

+ 3 - 3
src/views/product-repo/index.vue

@@ -21,10 +21,10 @@
         <el-table-column label="商品图片" min-width="100" align="center">
           <template slot-scope="scope">
             <el-image 
-              v-if="scope.row.productImageUrls && scope.row.productImageUrls.length"
+              v-if="scope.row.mainPicture && scope.row.mainPicture.length"
               style="width: 100px; height: 100px"
-              :src="scope.row.productImageUrls[0]" 
-              :preview-src-list="scope.row.productImageUrls">
+              :src="scope.row.mainPicture[0]" 
+              :preview-src-list="scope.row.mainPicture.slice(0, 5)">
             </el-image>
           </template>
         </el-table-column>