list.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. <template>
  2. <view>
  3. <!-- 头部背景和搜索 -->
  4. <view>
  5. <image src="/static/images/list-bg.png" class="top-image w-full" id="top-image" mode="widthFix"></image>
  6. </view>
  7. <!-- 搜索 -->
  8. <view class="content">
  9. <block v-if="policyList.length > 0">
  10. <view class="flex row-center white lg bold">
  11. <u-icon name="checkmark-circle-fill" size="48"></u-icon>
  12. <view class="m-l-12">匹配成功</view>
  13. </view>
  14. <view class="flex row-center m-t-14 white p-l-20 p-r-20">根据您的条件AI智能计算可能符合以下政策,具体以实际申报为准</view>
  15. <view class="m-t-22 p-l-24 p-r-24">
  16. <view class="top-line"></view>
  17. <view class="list">
  18. <view class="bg-white p-t-18 p-l-24 p-r-24 p-b-34">
  19. <!-- 人才层次标签 -->
  20. <u-tabs :list="policyList" name="level" :is-scroll="true" :current="currentTab"
  21. :bold="true" active-color="#DD4250" height="80" bar-width="80" font-size="32"
  22. @change="changeTab" />
  23. <view class="p-15 m-t-20" style="border: 1px solid #DD4250;box-shadow: 0px 3px 6px 1px rgba(243,113,113,0.39);border-radius: 9px;">
  24. <view class="bold">您可能符合的认定条款:</view>
  25. <view class="m-t-10 primary bold">
  26. <rich-text :nodes="policyList[currentTab].title"></rich-text>
  27. </view>
  28. <view class="m-t-10 tips" v-if="policyList[currentTab].content">
  29. <rich-text :nodes="policyList[currentTab].content"></rich-text>
  30. </view>
  31. </view>
  32. <!-- 政策列表 -->
  33. <view class="flex flex-wrap m-t-30">
  34. <view class="tag-item" :class="{ 'tat-active': activeIndex == index }"
  35. v-for="(item, index) in policyList[currentTab].policy" :key="index" @tap="changeTag(index)">
  36. {{ item.title }}
  37. </view>
  38. </view>
  39. <view v-for="(item, index) in policyList[currentTab].policy" :key="index" v-if="activeIndex == index">
  40. <!-- <view class="detail">{{ item.content }}</view> -->
  41. <rich-text :nodes="item.summary"></rich-text>
  42. <view class="flex row-center">
  43. <view class="user-logout flex col-center row-center white" @tap="goDetail(item)">
  44. <view class="m-r-12">查看“{{ item.title }}”详情</view>
  45. <u-icon name="arrow-rightward" size="28"></u-icon>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </block>
  53. <view class="flex row-center white lg bold" v-else>
  54. <u-icon name="close-circle" size="48"></u-icon>
  55. <view class="m-l-12">暂未匹配到政策</view>
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. import {
  62. mapGetters,
  63. mapActions
  64. } from 'vuex'
  65. import {
  66. pxToRpx
  67. } from '@/utils/tools'
  68. const app = getApp()
  69. const homeItem = {
  70. name: '首页'
  71. }
  72. export default {
  73. data() {
  74. return {
  75. activeIndex: 0,
  76. policyList: [],
  77. currentTab: 0,
  78. }
  79. },
  80. onLoad(option) {
  81. this.policyList = uni.getStorageSync('policyList');
  82. },
  83. onShow() {
  84. // this.getHomeFun();
  85. // this.getUser();
  86. },
  87. onHide() {},
  88. onPullDownRefresh() {
  89. // this.getUser().then(() => {
  90. // uni.stopPullDownRefresh();
  91. // })
  92. },
  93. methods: {
  94. // ...mapActions(['getUser']),
  95. changeTag(index) {
  96. this.activeIndex = index;
  97. },
  98. goDetail(item) {
  99. uni.setStorageSync('policyDetail', item);
  100. uni.navigateTo({
  101. url: '/pages/policy/detail?id=' + item.id + '&title=' + item.title,
  102. })
  103. },
  104. // 改变当前的Tabs位置
  105. changeTab(index) {
  106. this.currentTab = index;
  107. //todo 切换关联的政策列表
  108. },
  109. },
  110. computed: {
  111. ...mapGetters(['appConfig']),
  112. }
  113. }
  114. </script>
  115. <style lang="less" scoped>
  116. .huodong-details {
  117. padding-bottom: calc(200rpx + env(safe-area-inset-bottom));
  118. }
  119. .content {
  120. position: absolute;
  121. top: 54rpx;
  122. width: 100%;
  123. .detail {
  124. background: #F7F7F7;
  125. border-radius: 0rpx 0rpx 0rpx 0rpx;
  126. margin: 24rpx 0;
  127. padding: 24rpx;
  128. }
  129. .top-line {
  130. width: 100%;
  131. height: 24rpx;
  132. background: #DD4250;
  133. border-radius: 10rpx 10rpx 10rpx 10rpx;
  134. opacity: 1;
  135. border: 2rpx solid #B50818;
  136. }
  137. .list {
  138. margin-top: -12rpx;
  139. padding: 0 20rpx;
  140. }
  141. .tag-item {
  142. margin: 8rpx;
  143. padding: 16rpx 28rpx;
  144. background: #F7F8FA;
  145. border-radius: 8rpx 8rpx 8rpx 8rpx;
  146. opacity: 1;
  147. }
  148. .tat-active {
  149. color: #FFFFFF;
  150. background: #DD4250;
  151. border-radius: 8rpx 8rpx 8rpx 8rpx;
  152. }
  153. .user-logout {
  154. padding: 12rpx 32rpx;
  155. background: #DD4250;
  156. box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(221, 66, 80, 0.32);
  157. border-radius: 40rpx 40rpx 40rpx 40rpx;
  158. opacity: 1;
  159. }
  160. }
  161. .details-images {
  162. height: 408rpx;
  163. border-radius: 20rpx;
  164. overflow: hidden;
  165. width: 100%;
  166. image {
  167. width: 100%;
  168. height: 100%;
  169. }
  170. }
  171. .detail-title {
  172. // font-size: 36rpx;
  173. font-weight: bold;
  174. // padding: 30rpx 0;
  175. }
  176. .detail-cell {
  177. display: flex;
  178. // align-items: center;
  179. padding: 30rpx 0;
  180. .cell-img {
  181. padding: 5rpx 0;
  182. image {
  183. width: 48rpx;
  184. height: 48rpx;
  185. display: block
  186. }
  187. }
  188. }
  189. // .muted {
  190. // color: #989898;
  191. // padding-left: 10rpx;
  192. // }
  193. .detail-biaoti {
  194. // font-size: 36rpx;
  195. height: 88rpx;
  196. line-height: 88rpx;
  197. }
  198. .bj-w {
  199. background-color: #fff;
  200. }
  201. .padding-30 {
  202. padding: 0 30rpx !important;
  203. }
  204. .content-box {
  205. padding: 0 24rpx;
  206. box-shadow: 0rpx 8rpx 16rpx 2rpx rgba(0, 0, 0, 0.03);
  207. border-radius: 12rpx 12rpx 12rpx 12rpx;
  208. input {
  209. font-size: 28rpx;
  210. }
  211. textarea {
  212. width: 100%;
  213. height: 100rpx;
  214. font-size: 28rpx;
  215. }
  216. }
  217. .btn-r-border {
  218. position: relative;
  219. &::after {
  220. content: ' ';
  221. width: 1rpx;
  222. height: 36rpx;
  223. background-color: #CCCCCC;
  224. right: 0;
  225. top: 50%;
  226. margin-top: -18rpx;
  227. position: absolute;
  228. }
  229. }
  230. .width75 {
  231. width: 150rpx;
  232. font-weight: bold;
  233. }
  234. </style>
  235. <style lang="scss">
  236. .footer {
  237. left: 0%;
  238. bottom: 150rpx;
  239. width: 100%;
  240. padding: 0 24rpx;
  241. position: fixed;
  242. z-index: 99;
  243. .btn {
  244. height: 84rpx;
  245. line-height: 84rpx;
  246. background-color: $-color-primary;
  247. box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(243, 113, 113, 0.39);
  248. border-radius: 18rpx 18rpx 18rpx 18rpx;
  249. }
  250. }
  251. page {
  252. padding: 0;
  253. }
  254. .talent-tab {
  255. .title {
  256. font-size: 36rpx;
  257. font-weight: 400;
  258. color: #333333;
  259. }
  260. }
  261. </style>