list.vue 8.4 KB

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