list.vue 7.3 KB

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