researchTheme.vue 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <view class="container theme-hot-content">
  3. <view class="tab-bar-ul">
  4. <view class="item-content">
  5. <view @click="tabBarSwitchHandel(item)" :class="['item', tabBarActive === item.value && 'item-act']" v-for="item in tabBarList" :key="item.value">{{ item.name }}</view>
  6. </view>
  7. </view>
  8. <view class="content-ul">
  9. <view class="hot-li" v-for="item in dataList" :key="item.IndustrialManagementId">
  10. <view class="li-item hot-item">
  11. <view style="display: flex" class="text_oneLine hot-new" @click="themeDetails(item, '主题热度榜')">
  12. <text class="text_oneLine title" style="display: inline"> # {{ item.IndustryName }} </text>
  13. <image class="new-img" v-if="item.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_report.png"></image>
  14. </view>
  15. <text :class="item.IsFollw ? 'cancel-attention' : 'attention'" @click="isAttention(item, '主题')">{{ item.IsFollw ? "取消关注" : "+ 关注" }}</text>
  16. </view>
  17. <view class="li-item read-more" @click="themeDetails(item, '主题热度榜')">
  18. <text class="text-box text_oneLine" v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId">
  19. {{ val.SubjectName }}
  20. </text>
  21. </view>
  22. </view>
  23. </view>
  24. <u-loadmore :status="status" :load-text="loadText" v-if="page_no > 1" />
  25. <u-modal
  26. v-model="goFollowShow"
  27. :content-style="{ fontSize: '32rpx' }"
  28. @confirm="goFollowShowBtn"
  29. :show-cancel-button="isCancelBtn"
  30. :confirm-text="confirmText"
  31. @cancel="isCancelBtn = false"
  32. :show-title="false"
  33. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  34. :confirm-style="{ fontWeight: '700' }"
  35. >
  36. <view class="slot-content">
  37. <rich-text :nodes="accounts"></rich-text>
  38. </view>
  39. </u-modal>
  40. </view>
  41. </template>
  42. <script>
  43. import { Reports, Research, Report } from "@/config/api.js";
  44. import mixinsAuthorTheme from "../components/mixinsAuthorTheme";
  45. export default {
  46. data() {
  47. return {
  48. tabBarList: [
  49. {
  50. name: "更新时间",
  51. value: 1,
  52. },
  53. {
  54. name: "主题热度",
  55. value: 2,
  56. },
  57. ],
  58. };
  59. },
  60. watch: {
  61. page_no:{
  62. handler(val){
  63. console.log(val);
  64. }
  65. }
  66. },
  67. mixins: [mixinsAuthorTheme],
  68. methods: {
  69. // tab bar 切换
  70. tabBarSwitchHandel(item) {
  71. this.tabBarActive = item.value;
  72. },
  73. //主题热度/近期更新更多
  74. async getDataList() {
  75. const res = await Research.researchHotList({ ChartPermissionId: 31, ThemeType: 1 });
  76. if (res.Ret === 200) {
  77. this.status = res.Data.Paging.IsEnd ? "nomore" : "loadmore";
  78. if (this.refresh) {
  79. uni.stopPullDownRefresh();
  80. this.refresh = false;
  81. }
  82. this.dataList = this.page_no === 1 ? res.Data.List || [] : [...this.dataList, ...res.Data.List];
  83. }
  84. },
  85. },
  86. };
  87. </script>
  88. <style lang="scss" scope>
  89. .theme-hot-content {
  90. @import "../components/cssAuthorTheme.scss";
  91. }
  92. </style>