list.vue 7.5 KB

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