researchTheme.vue 3.1 KB

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