shaogen1995 3 yıl önce
ebeveyn
işleme
c8e93dca63

+ 40 - 17
hot/src/views/Home.vue

@@ -67,7 +67,7 @@
         <div
           class="swiper-pagination"
           slot="pagination"
-          v-if="lengthShow"
+          v-show="lengthShow"
         ></div>
       </swiper>
       <div
@@ -168,10 +168,34 @@ export default {
       data: {},
       iconArr,
       active: "",
+      // 标题的第一个和内容的第一个
+      fisTit: "",
+      fisTxt: "",
     };
   },
   watch: {
     active(newVal) {
+      // 定制的热点信息,并且切换为视频
+      if (this.myFlag && newVal == "video") {
+        this.myInd = 0;
+        this.data.title[0] = this.data.videoTit;
+        this.data.content[0] = this.data.videoTxt;
+      } else {
+        this.data.title[0] = this.fisTit;
+        this.data.content[0] = this.fisTxt;
+      }
+      if (newVal == "images") this.myInd = 0;
+      // 判断是否只有一张图片或者视频,ifrm   lengthShow
+      let tempType = this.data[this.active];
+      if (typeof tempType === "number") {
+        if (tempType > 1) this.lengthShow = true;
+        else this.lengthShow = false;
+      } else {
+        if (tempType && tempType.length && tempType.length > 1)
+          this.lengthShow = true;
+        else this.lengthShow = false;
+      }
+
       if (!newVal) {
         return;
       }
@@ -211,7 +235,9 @@ export default {
       dom.show();
     },
     imgSrc(val) {
-      // if (typeof val === "number") return `/data/${this.m}/img/${val}${this.data.suf}`; //线下调试
+      if (typeof val === "number")
+        // return `/data/${this.m}/img/${val}${this.data.suf}`;
+      //线下调试
       if (typeof val === "number") return `/erhai/data/${this.m}/img/${val}${this.data.suf}`; //打包
       else return val;
     },
@@ -235,17 +261,22 @@ export default {
       }/hot/js/data.js?time=${Math.random()}`;
       let result = (await this.$http.get(url)).data;
       let temp = result[this.m];
-      console.log(temp);
       let tempObj;
       tempObj = obj.find((v) => v.id === this.m);
-      if(tempObj) {
-        temp=tempObj
-        this.myFlag=true
-      }
-      else {
+      if (tempObj) {
+        temp = tempObj;
+        // 把标题的第一个和内容的第一个信息存起来
+        this.fisTit = temp.title[0];
+        this.fisTxt = temp.content[0];
+        this.myFlag = true;
+      } else {
+        // 把标题的第一个和内容的第一个信息存起来
+        this.fisTit = temp.title;
+        this.fisTxt = temp.content;
         temp.content = [temp.content];
         temp.title = [temp.title];
-        this.myFlag=false
+
+        this.myFlag = false;
       }
 
       this.data = temp;
@@ -264,14 +295,6 @@ export default {
           item.display = true;
         }
       });
-      // 判断是否只有一张图片或者视频,ifrm   lengthShow
-      let tempType = this.data[this.active];
-      if (typeof tempType === "number") {
-        if (tempType > 1) this.lengthShow = true;
-      } else {
-        if (tempType && tempType.length && tempType.length > 1)
-          this.lengthShow = true;
-      }
     },
 
     colseParent(item) {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 328 - 28
hot/src/views/data.js


+ 3 - 3
web/src/views/gui/component/quality.vue

@@ -36,7 +36,7 @@
             v-for="item in data"
             :key="item.id"
           >
-            <img v-lazy="`/data/goods/${item.id}.jpg`" alt="" />
+            <img v-lazy="`/erhai/data/goods/${item.id}.jpg`" alt="" />
             <p>{{ item.name }}</p>
           </div>
         </div>
@@ -61,7 +61,7 @@
       </viewer>
       <div class="imgBox">
         <img
-          v-lazy="`/data/goods/${goodInfo.id}.jpg`"
+          v-lazy="`/erhai/data/goods/${goodInfo.id}.jpg`"
           alt=""
           @click="loogImg(goodInfo.id)"
         />
@@ -107,7 +107,7 @@ export default {
     // 点击藏品里面的图片查看大图
     loogImg(id) {
       let dom = this.$refs.viewer.$viewer;
-      this.lookPics = [`/data/goods/${id}.jpg`];
+      this.lookPics = [`/erhai/data/goods/${id}.jpg`];
       dom.show();
     },
     // 点击藏品