researchTheme.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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="global_card_content hot-li" v-for="item in dataList" :key="item.IndustrialManagementId">
  10. <image class="hot-icon" v-if="item.IsHot" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/hot_report.png" mode=""></image>
  11. <view class="li-item hot-item" :style="{ 'margin-top': item.IsHot ? '40rpx' : '' }">
  12. <view style="display: flex" class="text_oneLine hot-new" @click="themeDetails(item, '主题热度榜')">
  13. <text class="text_oneLine global_title" style="display: inline">{{ item.IndustryName }} </text>
  14. </view>
  15. <view :class="['follw', 'global_content_center', item.IsFollw && 'cancel-follw']" @click="isAttention(item, '主题')">
  16. {{ item.IsFollw ? "取消关注" : "+ 关注" }}
  17. </view>
  18. </view>
  19. <view class="li-item read-more" @click="themeDetails(item, '主题热度榜')">
  20. <text class="text-box text_oneLine" v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId">
  21. {{ val.SubjectName }}
  22. </text>
  23. </view>
  24. </view>
  25. </view>
  26. <u-loadmore :status="status" :load-text="loadText" v-if="page_no > 1" />
  27. <u-modal
  28. v-model="goFollowShow"
  29. :content-style="{ fontSize: '32rpx' }"
  30. @confirm="goFollowShowBtn"
  31. :show-cancel-button="isCancelBtn"
  32. :confirm-text="confirmText"
  33. @cancel="isCancelBtn = false"
  34. :show-title="false"
  35. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  36. :confirm-style="{ fontWeight: '700' }"
  37. >
  38. <view class="slot-content">
  39. <rich-text :nodes="accounts"></rich-text>
  40. </view>
  41. </u-modal>
  42. <Loading />
  43. </view>
  44. </template>
  45. <script>
  46. import { Reports, Research, Report } from "@/config/api.js";
  47. import mixinsAuthorTheme from "../components/mixinsAuthorTheme";
  48. export default {
  49. data() {
  50. return {
  51. tabBarList: [
  52. {
  53. name: "更新时间",
  54. value: 2,
  55. },
  56. {
  57. name: "主题热度",
  58. value: 1,
  59. },
  60. ],
  61. };
  62. },
  63. mixins: [mixinsAuthorTheme],
  64. methods: {
  65. //主题热度/近期更新更多
  66. async getDataList() {
  67. const res = await Research.researchHotList({
  68. ChartPermissionId: 31,
  69. PageSize: this.pageSize,
  70. CurrentIndex: this.page_no,
  71. ThemeType: this.tabBarActive,
  72. });
  73. if (res.Ret === 200) {
  74. this.status = res.Data.Paging.IsEnd ? "nomore" : "loadmore";
  75. if (this.refresh) {
  76. uni.stopPullDownRefresh();
  77. this.refresh = false;
  78. }
  79. this.dataList = this.page_no === 1 ? res.Data.List || [] : [...this.dataList, ...res.Data.List];
  80. }
  81. },
  82. },
  83. };
  84. </script>
  85. <style lang="scss" scope>
  86. .theme-hot-content {
  87. background-color: $uni-bg-color;
  88. padding-bottom: 30rpx;
  89. .tab-bar-ul {
  90. position: sticky;
  91. top: 0;
  92. left: 0;
  93. height: 111rpx;
  94. align-items: center;
  95. display: flex;
  96. justify-content: flex-end;
  97. padding: 10px 20rpx;
  98. background-color: $uni-bg-color;
  99. border-bottom: 2rpx solid #f6f6f6;
  100. z-index: 9;
  101. .item-content {
  102. display: flex;
  103. height: 48rpx;
  104. background: #dcdfe6;
  105. width: 288rpx;
  106. font-size: 24rpx;
  107. font-weight: 600;
  108. border-radius: 150rpx;
  109. color: #666;
  110. }
  111. .item {
  112. display: flex;
  113. align-items: center;
  114. justify-content: center;
  115. width: 144rpx;
  116. height: 48rpx;
  117. border-radius: 150rpx;
  118. }
  119. .item-act {
  120. background-color: $uni-color-new;
  121. color: #fff;
  122. }
  123. }
  124. .content-ul {
  125. padding: 10rpx 30rpx;
  126. .hot-li {
  127. background-color: #fff;
  128. margin-bottom: 20rpx;
  129. position: relative;
  130. }
  131. .li-item {
  132. display: flex;
  133. .title {
  134. font-size: 28rpx;
  135. line-height: 39rpx;
  136. font-weight: 500;
  137. color: #333;
  138. }
  139. .li-industry {
  140. color: $uni-color-new;
  141. margin-left: 20rpx;
  142. display: inline-block;
  143. font-size: 32rpx;
  144. font-weight: 600;
  145. }
  146. .time-user {
  147. display: flex;
  148. align-items: center;
  149. font-size: 24rpx;
  150. }
  151. .li-user {
  152. display: flex;
  153. align-items: center;
  154. flex-shrink: 0;
  155. width: 170rpx;
  156. margin-left: 75rpx;
  157. }
  158. .li-title {
  159. display: flex;
  160. }
  161. }
  162. .read-more {
  163. display: flex;
  164. flex-wrap: wrap;
  165. margin-top: 20rpx;
  166. .text-box {
  167. margin-top: 30rpx;
  168. margin-right: 10rpx;
  169. width: 150rpx;
  170. height: 48rpx;
  171. background-color: #f8f8fa;
  172. color: $uni-color-new;
  173. line-height: 48rpx;
  174. border-radius: 200rpx;
  175. font-weight: 600;
  176. font-size: 24rpx;
  177. text-align: center !important;
  178. text-indent: 0em;
  179. }
  180. }
  181. .hot-item {
  182. justify-content: space-between;
  183. align-items: center;
  184. .hot-new {
  185. align-items: center;
  186. flex: 1;
  187. padding-right: 20rpx;
  188. }
  189. }
  190. .hot-icon {
  191. position: absolute;
  192. width: 106rpx !important;
  193. height: 48rpx !important;
  194. top: 0 !important;
  195. left: 0 !important;
  196. margin: 0 !important;
  197. padding: 0 !important;
  198. border-radius: 0 !important;
  199. }
  200. .follw {
  201. color: #fff;
  202. border-radius: 4rpx;
  203. font-size: 24rpx;
  204. width: 110rpx;
  205. height: 42rpx;
  206. background-color: $uni-color-new;
  207. }
  208. .cancel-follw {
  209. background-color: #e5efff;
  210. color: $uni-color-new;
  211. }
  212. }
  213. }
  214. </style>