list.vue 7.4 KB

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