bding hace 1 año
padre
commit
8a09f94aec
Se han modificado 1 ficheros con 27 adiciones y 3 borrados
  1. 27 3
      pages/index/index.vue

+ 27 - 3
pages/index/index.vue

@@ -49,6 +49,7 @@
           <view class="lable-row" v-for="(item, index) in lableIsRows" :key="index">
             <view :class="['lable-item', lable.isAct && 'item-active']" v-for="lable in item" :key="lable.TagId" @click="lableKeysHandler(lable)">
               {{ lable.TagName }}
+              <image v-if="lable.TagName == '问答'" class="item-image" lazy-load src="https://hzstatic.hzinsights.com/cygx/icon/new_report.png"></image>
             </view>
           </view>
         </view>
@@ -409,6 +410,15 @@ export default {
       const res = await Home.homeTagListCustom();
       if (res.Ret === 200) {
         this.dataListLable = res.Data.List || [];
+        let arr = [];
+        if (this.actIdLable) {
+          arr = this.actIdLable.split(",").map((_) => Number(_));
+        }
+        this.dataListLable.forEach((item) => {
+          if (arr.includes(item.TagId)) {
+            item.isAct = true;
+          }
+        });
         this.industryTablList = res.Data.ListPermission || [];
       }
     },
@@ -429,7 +439,11 @@ export default {
       this.getNewList();
     });
   },
-  onLoad() {
+  onLoad(options) {
+    console.log(options);
+    this.industrytabActId = options.industrytabActId ? Number(options.industrytabActId) : 0;
+    this.actIdLable = options.findIndexId;
+    console.log(this.actIdLable, "======");
     this.getBannerList();
     this.getNewList();
     this.homeTagListCustom();
@@ -454,7 +468,7 @@ export default {
     this.page_no = 1;
     this.refresh = true;
     this.getNewList();
-    this.homeTagListCustom()
+    this.homeTagListCustom();
   },
   onPageScroll(val) {
     this.isScrollNumber = val.scrollTop;
@@ -475,9 +489,10 @@ export default {
         imageUrl: item.AudioShareImg || item.ShareImg,
       };
     } else {
+      console.log(this.actIdLable);
       return {
         title: this.isHorzMobile ? "好友向您推荐此内容,上传名片享查研观向免费月卡!" : "弘则研究—聚焦·前瞻·客观·深度",
-        path: "/pages/index/index",
+        path: "/pages/index/index?industrytabActId=" + this.industrytabActId + "&findIndexId=" + this.actIdLable,
         success: (res) => {},
         fail: (err) => {},
       };
@@ -615,6 +630,7 @@ export default {
       font-size: 24rpx;
     }
     .lable-item {
+      position: relative;
       flex-shrink: 0;
       padding: 8rpx 40rpx;
       background: #ffffff;
@@ -624,6 +640,14 @@ export default {
       white-space: nowrap;
       // padding-top: 20rpx;
       color: #999999;
+      .item-image {
+        position: absolute;
+        top: -16rpx;
+        right: -18rpx;
+        width: 60rpx;
+        height: 30rpx;
+        border-radius: 4rpx;
+      }
     }
     .item-active {
       border: none;