researchAuthor.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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 kol-li" :style="{ 'padding-top': item.IsHot ? '50rpx' : '' }" v-for="item in dataList" :key="item.DepartmentId">
  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. <image @click="authorDetails(item)" :src="item.ImgUrl" v-if="item.ImgUrl"></image>
  12. <view class="li-item kol-item">
  13. <view class="item-top">
  14. <view class="hot-item global_title" @click="authorDetails(item)">
  15. {{ item.NickName }}
  16. </view>
  17. <view :class="['follw', 'global_content_center', item.IsFollw && 'cancel-follw']" @click="isAttention(item, '专家')">
  18. {{ item.IsFollw ? "取消关注" : "+ 关注" }}
  19. </view>
  20. </view>
  21. <text @click="themeDetails(val, 'KOL榜')" class="kol-text text_oneLine" v-for="val in item.List" :key="val.IndustrialManagementId"> # {{ val.IndustryName }} </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. <Loading />
  42. </view>
  43. </template>
  44. <script>
  45. import { Reports, Research, Report } from "@/config/api.js";
  46. import mixinsAuthorTheme from "../components/mixinsAuthorTheme";
  47. export default {
  48. data() {
  49. return {
  50. tabBarList: [
  51. {
  52. name: "更新时间",
  53. value: 2,
  54. },
  55. {
  56. name: "关注度",
  57. value: 1,
  58. },
  59. ],
  60. };
  61. },
  62. mixins: [mixinsAuthorTheme],
  63. methods: {
  64. //kol
  65. async getDataList() {
  66. const res = await Research.researchKolList({
  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. authorDetails(item) {
  82. uni.navigateTo({
  83. url: "/reportPages/authorPages/authorPages?id=" + item.DepartmentId,
  84. });
  85. },
  86. },
  87. };
  88. </script>
  89. <style lang="scss" scope>
  90. .theme-hot-content {
  91. padding-bottom: 30rpx;
  92. background: $uni-bg-color;
  93. .tab-bar-ul {
  94. position: sticky;
  95. top: 0;
  96. left: 0;
  97. height: 111rpx;
  98. align-items: center;
  99. display: flex;
  100. justify-content: flex-end;
  101. padding: 10px 20rpx;
  102. background-color: #fff;
  103. border-bottom: 2rpx solid #f6f6f6;
  104. .item-content {
  105. display: flex;
  106. height: 48rpx;
  107. background: #dcdfe6;
  108. width: 288rpx;
  109. font-size: 24rpx;
  110. font-weight: 600;
  111. border-radius: 150rpx;
  112. color: #666;
  113. }
  114. .item {
  115. display: flex;
  116. align-items: center;
  117. justify-content: center;
  118. width: 144rpx;
  119. height: 48rpx;
  120. border-radius: 150rpx;
  121. }
  122. .item-act {
  123. background-color: $uni-color-new;
  124. color: #fff;
  125. }
  126. }
  127. .content-ul {
  128. padding: 0 30rpx;
  129. .kol-li {
  130. position: relative;
  131. display: flex;
  132. align-items: center;
  133. padding-bottom: 30rpx;
  134. margin-bottom: 20rpx;
  135. background-color: #fff;
  136. image {
  137. width: 120rpx;
  138. height: 120rpx;
  139. border-radius: 8rpx;
  140. margin: 0 20rpx 0 15rpx;
  141. overflow: hidden;
  142. flex-shrink: 0;
  143. }
  144. }
  145. .kol-item {
  146. display: flex;
  147. flex-wrap: wrap;
  148. width: 480rpx;
  149. height: 120rpx;
  150. align-items: baseline;
  151. margin-bottom: 20rpx;
  152. .item-top {
  153. width: 100%;
  154. display: flex;
  155. align-items: center;
  156. justify-content: space-between;
  157. font-size: 29rpx;
  158. font-weight: 700;
  159. }
  160. .kol-text {
  161. width: 50%;
  162. margin-top: 10rpx;
  163. flex-shrink: 0;
  164. font-size: 24rpx;
  165. font-weight: 400;
  166. color: #333;
  167. }
  168. }
  169. .li-item {
  170. display: flex;
  171. .title {
  172. font-size: 28rpx;
  173. line-height: 39rpx;
  174. font-weight: 500;
  175. color: #333;
  176. }
  177. }
  178. .hot-item {
  179. justify-content: space-between;
  180. align-items: center;
  181. .hot-new {
  182. align-items: center;
  183. flex: 1;
  184. padding-right: 20rpx;
  185. }
  186. .new-img {
  187. width: 60rpx;
  188. height: 30rpx;
  189. margin-left: 15rpx;
  190. flex-shrink: 0;
  191. }
  192. }
  193. .follw {
  194. color: #fff;
  195. border-radius: 4rpx;
  196. font-size: 24rpx;
  197. width: 110rpx;
  198. height: 42rpx;
  199. background-color: $uni-color-new;
  200. }
  201. .cancel-follw {
  202. background-color: #e5efff;
  203. color: $uni-color-new;
  204. }
  205. .hot-icon {
  206. position: absolute;
  207. width: 106rpx !important;
  208. height: 48rpx !important;
  209. top: 0 !important;
  210. left: 0 !important;
  211. margin: 0 !important;
  212. padding: 0 !important;
  213. border-radius: 0!important;
  214. }
  215. }
  216. }
  217. </style>