Browse Source

切换9.4

bding 2 years ago
parent
commit
a6cb8e59d1

+ 4 - 0
config/modules/Research.js

@@ -38,4 +38,8 @@ export const Research = {
   researchArticleNewList: (params) => {
     return getHttp("/research/article/newList", params, 0);
   },
+  /* KOL榜列表 */
+  researchKolList: (params) => {
+    return getHttp("/research/kolList", params, 0);
+  },
 };

+ 6 - 0
pages-purchaser/components/cssAuthorTheme.scss

@@ -228,4 +228,10 @@
             flex-shrink: 0;
         }
     }
+
+    .hot-icon {
+        width: 30rpx;
+        height: 30rpx;
+        margin-left: 15rpx;
+    }
 }

+ 3 - 1
pages-purchaser/components/mixinsAuthorTheme.js

@@ -6,7 +6,7 @@ export default {
       accounts: "",
       isCancelBtn: false,
       goFollowShow: false,
-      tabBarActive: 1,
+      tabBarActive: 2,
       dataList: [],
       status: "loadmore",
       loadText: {
@@ -23,6 +23,8 @@ export default {
     // tab bar 切换
     tabBarSwitchHandel(item) {
       this.tabBarActive = item.value;
+      this.page_no = 1;
+      this.getDataList();
     },
     //去往主题详情
     themeDetails(item, source) {

+ 11 - 13
pages-purchaser/researchAuthor/researchAuthor.vue

@@ -47,26 +47,26 @@ export default {
       tabBarList: [
         {
           name: "更新时间",
-          value: 1,
+          value: 2,
         },
         {
           name: "关注度",
-          value: 2,
+          value: 1,
         },
       ],
     };
   },
   mixins: [mixinsAuthorTheme],
   methods: {
-    // tab bar 切换
-    tabBarSwitchHandel(item) {
-      this.tabBarActive = item.value;
-    },
-    //主题热度/近期更新更多
+    //kol
     async getDataList() {
-      const res = await Research.researchKolList({ ChartPermissionId: 31 });
+      const res = await Research.researchKolList({
+        PageSize: this.pageSize,
+        CurrentIndex: this.page_no,
+        ThemeType: this.tabBarActive,
+      });
       if (res.Ret === 200) {
-        // this.status = res.Data.Paging.IsEnd ? "nomore" : "loadmore";
+        this.status = res.Data.Paging.IsEnd ? "nomore" : "loadmore";
         if (this.refresh) {
           uni.stopPullDownRefresh();
           this.refresh = false;
@@ -74,21 +74,19 @@ export default {
         this.dataList = this.page_no === 1 ? res.Data.List || [] : [...this.dataList, ...res.Data.List];
       }
     },
-        //去往作者详情
+    //去往作者详情
     authorDetails(item) {
       uni.navigateTo({
         url: "/reportPages/authorPages/authorPages?id=" + item.DepartmentId,
       });
     },
   },
-  onLoad() {
-    this.getDataList();
-  },
 };
 </script>
 
 <style lang="scss" scope>
 .theme-hot-content {
+  padding-bottom: 30rpx;
   @import "../components/cssAuthorTheme.scss";
 }
 </style>

+ 11 - 15
pages-purchaser/researchTheme/researchTheme.vue

@@ -10,7 +10,8 @@
         <view class="li-item hot-item">
           <view style="display: flex" class="text_oneLine hot-new" @click="themeDetails(item, '主题热度榜')">
             <text class="text_oneLine title" style="display: inline"> # {{ item.IndustryName }} </text>
-            <image class="new-img" v-if="item.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_report.png"></image>
+            <!-- <image class="new-img" v-if="item.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_report.png"></image> -->
+            <image class="hot-icon" v-if="item.IsHot" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/hot_report.png" mode=""></image>
           </view>
           <text :class="item.IsFollw ? 'cancel-attention' : 'attention'" @click="isAttention(item, '主题')">{{ item.IsFollw ? "取消关注" : "+ 关注" }}</text>
         </view>
@@ -49,31 +50,25 @@ export default {
       tabBarList: [
         {
           name: "更新时间",
-          value: 1,
+          value: 2,
         },
         {
           name: "主题热度",
-          value: 2,
+          value: 1,
         },
       ],
     };
   },
-  watch: {
-   page_no:{
-    handler(val){
-      console.log(val);
-    }
-   }
-  },
   mixins: [mixinsAuthorTheme],
   methods: {
-    // tab bar 切换
-    tabBarSwitchHandel(item) {
-      this.tabBarActive = item.value;
-    },
     //主题热度/近期更新更多
     async getDataList() {
-      const res = await Research.researchHotList({ ChartPermissionId: 31, ThemeType: 1 });
+      const res = await Research.researchHotList({
+        ChartPermissionId: 31,
+        PageSize: this.pageSize,
+        CurrentIndex: this.page_no,
+        ThemeType: this.tabBarActive,
+      });
       if (res.Ret === 200) {
         this.status = res.Data.Paging.IsEnd ? "nomore" : "loadmore";
         if (this.refresh) {
@@ -89,6 +84,7 @@ export default {
 
 <style lang="scss" scope>
 .theme-hot-content {
+  padding-bottom: 30rpx;
   @import "../components/cssAuthorTheme.scss";
 }
 </style>

+ 1 - 1
pages/purchaser/purchaser.vue

@@ -343,7 +343,7 @@ export default {
     },
     // 跳转主题 of 作者
     goThemeAuthor(type) {
-      type === "主题" ? uni.navigateTo({ url: "/pages-purchaser/researchTheme/researchTheme" }) : "";
+      type === "主题" ? uni.navigateTo({ url: "/pages-purchaser/researchTheme/researchTheme" }) : uni.navigateTo({ url: "/pages-purchaser/researchAuthor/researchAuthor" });
     },
     // 获取最新下的文章类型
     async researchArticleTypeList() {