Browse Source

Merge branch 'master' into 12.7

bding 1 year ago
parent
commit
f63bd91d87

+ 1 - 1
components/videoModule/index.vue

@@ -86,7 +86,7 @@ export default {
     //视频的播放事件
     handelVideoPlayChild() {
       this.videoContext = wx.createVideoContext(this.videoPopList.Id.toString(), this);
-      Home.microAideoHistoryAdd({ SourceId: this.videoPopList.ActivityId || this.videoPopList.Id, SourceType: this.videoPopList.ActivityId ? 2 : 1, PageRouter: this.$store.state.pageRouterReport });
+      Home.microAideoHistoryAdd({ SourceId: this.videoPopList.ActivityId || this.videoPopList.Id, SourceType: this.videoPopList.ActivityId ? 2 : 3, PageRouter: this.$store.state.pageRouterReport });
       this.curVideoTime = 0;
       if (this.curVideoId == this.videoPopList.Id || this.activityVideoId == this.videoPopList.ActivityId) {
         this.curVideoTime = this.$store.state.videoPlay.palyCurrentTime;

+ 1 - 1
pageMy/myCollection/myCollection.vue

@@ -228,7 +228,7 @@ export default {
         PageRouter: this.$store.state.pageRouterReport,
       });
       if (res.Ret === 200) {
-        let index = this.collectList.findIndex((key) => key.Id == item.Id);
+        let index = this.collectList.findIndex((key) => key.SourceId == item.SourceId && key.Type == item.Type);
         this.collectList.splice(index, 1);
         uni.showToast({
           title: res.Msg,

+ 1 - 1
pages-search/components/roadshow.vue

@@ -49,7 +49,7 @@ export default {
         PageRouter: this.$store.state.pageRouterReport,
       });
       if (res.Ret === 200) {
-        let index = this.roadshowPageList.findIndex((key) => key.Id == item.Id);
+        let index = this.roadshowPageList.findIndex((key) => key.SourceId == item.SourceId && key.Type == item.Type);
 
         res.Data.Status == 1 ? (this.$parent.roadshowPageList[index].IsCollect = true) : (this.$parent.roadshowPageList[index].IsCollect = false);
         uni.showToast({

+ 53 - 19
pages/index/index.vue

@@ -30,14 +30,26 @@
           </view>
         </swiper>
       </view>
-      <view
-        v-if="isTopHeight"
-        class="lable-select-content"
-        :style="[{ top: isTopHeight }, { 'background-color': isScrollNumber >= 175 ? '#fff' : '#f5f6fa' }, { 'box-shadow': isScrollNumber >= 175 ? '0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16)' : '' }]"
-      >
-        <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 }}
+      <view class="lable-select-box">
+        <view class="global_two_tabs industry-box-tabs">
+          <view
+            :class="['item', item.ChartPermissionId == industrytabActId && 'tabs-active']"
+            v-for="(item, index) in industryTablList"
+            :key="item.ChartPermissionId"
+            @click="toggleIndustryTab(item, index)"
+          >
+            {{ item.PermissionName }}
+          </view>
+        </view>
+        <view
+          v-if="isTopHeight"
+          class="lable-select-content"
+          :style="[{ top: isTopHeight }, { 'background-color': isScrollNumber >= 175 ? '#fff' : '#f5f6fa' }, { 'box-shadow': isScrollNumber >= 175 ? '0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16)' : '' }]"
+        >
+          <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 }}
+            </view>
           </view>
         </view>
       </view>
@@ -150,6 +162,8 @@ export default {
       isTopHeight: "",
       lableArrList: [],
       showAudioPop: false,
+      industryTablList: [],
+      industrytabActId: 0,
     };
   },
   computed: {
@@ -202,6 +216,7 @@ export default {
         PageSize: this.pageSize,
         CurrentIndex: this.page_no,
         TagIds: this.actIdLable,
+        ChartPermissionId: this.industrytabActId,
       });
       if (res.Ret === 200) {
         this.status = !res.Data.Paging.IsEnd ? "loadmore" : "nomore";
@@ -234,7 +249,8 @@ export default {
         PageRouter: this.$store.state.pageRouterReport,
       });
       if (res.Ret === 200) {
-        let index = this.newDataList.findIndex((key) => key.Roadshow && key.Roadshow.Id == item.Id);
+        console.log(item, this.newDataList);
+        let index = this.newDataList.findIndex((key) => key.Roadshow && key.Roadshow.SourceId == item.SourceId && key.Roadshow.Type == item.Type);
         res.Data.Status == 1 ? (this.newDataList[index].Roadshow.IsCollect = true) : (this.newDataList[index].Roadshow.IsCollect = false);
         uni.showToast({
           title: res.Msg,
@@ -395,14 +411,19 @@ export default {
     async homeTagListCustom() {
       const res = await Home.homeTagListCustom();
       if (res.Ret === 200) {
-        const arr = res.Data.List || [];
-        this.dataListLable = arr.map((item) => {
-          return {
-            ...item,
-            isAct: false,
-          };
-        });
+        this.dataListLable = res.Data.List || [];
+        this.industryTablList = res.Data.ListPermission || [];
+      }
+    },
+    // 行业选择的筛选
+    toggleIndustryTab(item) {
+      if (this.industrytabActId === item.ChartPermissionId) {
+        this.industrytabActId = 0;
+      } else {
+        this.industrytabActId = item.ChartPermissionId;
       }
+      this.page_no = 1;
+      this.getNewList();
     },
   },
   mounted() {
@@ -578,17 +599,19 @@ export default {
       color: #376cbb;
     }
   }
-  .lable-select-content {
+  .lable-select-box {
     position: sticky;
     left: 0;
     top: 88px;
+    z-index: 9;
+    width: 100%;
+  }
+  .lable-select-content {
     overflow: hidden;
     overflow-x: auto;
     width: 100%;
     background-color: #fff;
     padding: 10rpx 0 20rpx 20rpx;
-    z-index: 9;
-
     .lable-row {
       display: flex;
       font-size: 24rpx;
@@ -611,5 +634,16 @@ export default {
       color: $uni-color-new;
     }
   }
+  .industry-box-tabs {
+    background-color: #fff;
+    align-items: center;
+    justify-content: space-between;
+    padding: 0 10rpx;
+    .item {
+      background-color: #f8f8fa;
+      border-radius: 200rpx;
+      height: 64rpx;
+    }
+  }
 }
 </style>

+ 10 - 4
pages/material/material.vue

@@ -5,7 +5,7 @@
       <view class="top-tabs">
         <block v-for="item in topTabBars" :key="item.Id">
           <view v-if="item.IsShow" :class="['item', item.Id == topTabsActive && 'tabs-active']" @click="topTabsChange(item)">
-            {{ item.Name}}
+            {{ item.Name }}
             <block v-if="(item.Id === 3 || item.Name == '图表') && wholeShowListData.IsShowChart">
               <image class="limit-img tabs-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/limit_icon.png" mode=""></image>
             </block>
@@ -486,8 +486,14 @@ export default {
         PageRouter: this.$store.state.pageRouterReport,
       });
       if (res.Ret === 200) {
-        let index = this.roadshowPageList.findIndex((key) => key.Id == item.Id);
-        res.Data.Status == 1 ? (this.roadshowPageList[index].IsCollect = true) : (this.roadshowPageList[index].IsCollect = false);
+        let index = this.roadshowPageList.findIndex((key) => key.SourceId == item.SourceId && key.Type == item.Type);
+        console.log(index);
+        // this.$nextTick(() => {
+
+        // });
+        res.Data.Status == 1 ? this.$set(this.roadshowPageList[index], "IsCollect", true) : this.$set(this.roadshowPageList[index], "IsCollect", false);
+        console.log(this.roadshowPageList[index]);
+
         uni.showToast({
           title: res.Msg,
           duration: 2000,
@@ -755,7 +761,7 @@ export default {
     width: 160rpx;
     // margin-right: 20rpx;
     padding-right: 20rpx;
-    height: 51rpx;
+    height: 64rpx;
     border-radius: 26rpx;
     background: #f8f8fa;
   }