shaogen1995 4 лет назад
Родитель
Сommit
c06aa34372
1 измененных файлов с 10 добавлено и 2 удалено
  1. 10 2
      index/src/views/tab3/index.vue

+ 10 - 2
index/src/views/tab3/index.vue

@@ -176,11 +176,18 @@ export default {
         // this.mySrc = '/4dage/Model.html'
         this.modelShow = true
       } else if (item.type === 'img') {
+        this.imgBigNum = 1
         const res = await goodDetail(item.id)
         // console.log(998, res)
         const temp = []
         res.data.file.forEach(v => {
-          temp.push(this.baseURL + v.filePath)
+          console.log(998, v)
+          if (v.isIndex === 1) temp.push(this.baseURL + v.filePath)
+          else {
+            setTimeout(() => {
+              temp.push(this.baseURL + v.filePath)
+            }, 0)
+          }
         })
         this.srcList = temp
         this.$nextTick(() => {
@@ -192,7 +199,7 @@ export default {
               this.imgBigNum--
               if (this.imgBigNum === 0) this.imgBigNum = this.srcList.length
             })
-            // 按钮
+            // 按钮
             const tempRight = document.querySelector('.el-image-viewer__next')
             tempRight.addEventListener('click', () => {
               this.imgBigNum++
@@ -212,6 +219,7 @@ export default {
     },
     cutTab (val) {
       if (this.formData.type === val.type) return
+      this.formData.pageNum = 1
       this.formData.type = val.type
       this.goodList(this.formData)
     },