123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- <template>
- <view>
- <!-- 头部背景和搜索 -->
- <view>
- <image src="/static/images/list-bg.png" class="top-image w-full" id="top-image" mode="widthFix"></image>
- </view>
- <!-- 搜索 -->
- <view class="content">
- <view class="flex row-center white lg bold">
- <u-icon name="checkmark-circle-fill" size="48"></u-icon>
- <view class="m-l-12" v-if="policyList.length > 0">匹配成功</view>
- <view class="m-l-12" v-else>暂未匹配到政策</view>
- </view>
- <block v-if="policyList.length > 0">
- <view class="flex row-center m-t-14 white p-l-20 p-r-20" >根据您的条件AI智能计算可能符合以下政策,具体以实际申报为准</view>
- </block>
-
- <view class="m-t-22 p-l-24 p-r-24">
- <view class="top-line"></view>
- <view class="list">
- <view class="bg-white p-t-18 p-l-24 p-r-24 p-b-34">
- <!-- 人才层次 -->
- <u-tabs :list="policyCengci" name="title" :is-scroll="true" :current="currentTab" :bold="false"
- active-color="#DD4250" height="80" font-size="24" @change="changeTab" />
- <!-- 标签 -->
- <view class="flex flex-wrap">
- <view class="tag-item" :class="{ 'tat-active': activeIndex == index }"
- v-for="(item, index) in policyList" :key="index" @tap="changeTag(index)">{{ item.title }}
- </view>
- </view>
- <view v-for="(item, index) in policyList" :key="index" v-if="activeIndex == index">
- <!-- <view class="detail">{{ item.content }}</view> -->
- <rich-text :nodes="item.content"></rich-text>
- <view class="flex row-center">
- <view class="user-logout flex col-center row-center white"
- @tap="goDetail(item)">
- <view class="m-r-12">查看“{{ item.title }}”详情</view>
- <u-icon name="arrow-rightward" size="28"></u-icon>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapGetters,
- mapActions
- } from 'vuex'
- import {
- pxToRpx
- } from '@/utils/tools'
- const app = getApp()
- const homeItem = {
- name: '首页'
- }
- export default {
- data() {
- return {
- activeIndex: 0,
- policyList: [],
- policyCengci: [],
- currentTab: 0,
- }
- },
- onLoad(option) {
- this.policyList = uni.getStorageSync('policyList');
- this.policyCengci = uni.getStorageSync('policyCengci');
- },
- onShow() {
- // this.getHomeFun();
- // this.getUser();
- },
- onHide() {},
- onPullDownRefresh() {
- // this.getUser().then(() => {
- // uni.stopPullDownRefresh();
- // })
- },
- methods: {
- // ...mapActions(['getUser']),
- changeTag(index) {
- this.activeIndex = index;
- },
- goDetail(item){
- uni.setStorageSync('policyDetail', item);
- uni.navigateTo({
- url: '/pages/policy/detail?id=' + item.id+ '&title=' + item.title,
- })
- },
- // 改变当前的Tabs位置
- changeTab(index) {
- this.currentTab = index;
- //todo 切换关联的政策列表
- },
- },
- computed: {
- ...mapGetters(['appConfig']),
- }
- }
- </script>
- <style lang="less" scoped>
- .huodong-details {
- padding-bottom: calc(200rpx + env(safe-area-inset-bottom));
- }
- .content {
- position: absolute;
- top: 54rpx;
- width: 100%;
- .detail {
- background: #F7F7F7;
- border-radius: 0rpx 0rpx 0rpx 0rpx;
- margin: 24rpx 0;
- padding: 24rpx;
- }
- .top-line {
- width: 100%;
- height: 24rpx;
- background: #DD4250;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- opacity: 1;
- border: 2rpx solid #B50818;
- }
- .list {
- margin-top: -12rpx;
- padding: 0 20rpx;
- }
- .tag-item {
- margin: 8rpx;
- padding: 16rpx 28rpx;
- background: #F7F8FA;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- opacity: 1;
- }
- .tat-active {
- color: #FFFFFF;
- background: #DD4250;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- }
- .user-logout {
- padding: 12rpx 32rpx;
- background: #DD4250;
- box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(221, 66, 80, 0.32);
- border-radius: 40rpx 40rpx 40rpx 40rpx;
- opacity: 1;
- }
- }
- .details-images {
- height: 408rpx;
- border-radius: 20rpx;
- overflow: hidden;
- width: 100%;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .detail-title {
- // font-size: 36rpx;
- font-weight: bold;
- // padding: 30rpx 0;
- }
- .detail-cell {
- display: flex;
- // align-items: center;
- padding: 30rpx 0;
- .cell-img {
- padding: 5rpx 0;
- image {
- width: 48rpx;
- height: 48rpx;
- display: block
- }
- }
- }
- // .muted {
- // color: #989898;
- // padding-left: 10rpx;
- // }
- .detail-biaoti {
- // font-size: 36rpx;
- height: 88rpx;
- line-height: 88rpx;
- }
- .bj-w {
- background-color: #fff;
- }
- .padding-30 {
- padding: 0 30rpx !important;
- }
- .content-box {
- padding: 0 24rpx;
- box-shadow: 0rpx 8rpx 16rpx 2rpx rgba(0, 0, 0, 0.03);
- border-radius: 12rpx 12rpx 12rpx 12rpx;
- input {
- font-size: 28rpx;
- }
- textarea {
- width: 100%;
- height: 100rpx;
- font-size: 28rpx;
- }
- }
- .btn-r-border {
- position: relative;
- &::after {
- content: ' ';
- width: 1rpx;
- height: 36rpx;
- background-color: #CCCCCC;
- right: 0;
- top: 50%;
- margin-top: -18rpx;
- position: absolute;
- }
- }
- .width75 {
- width: 150rpx;
- font-weight: bold;
- }
- </style>
- <style lang="scss">
- .footer {
- left: 0%;
- bottom: 150rpx;
- width: 100%;
- padding: 0 24rpx;
- position: fixed;
- z-index: 99;
- .btn {
- height: 84rpx;
- line-height: 84rpx;
- background-color: $-color-primary;
- box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(243, 113, 113, 0.39);
- border-radius: 18rpx 18rpx 18rpx 18rpx;
- }
- }
- page {
- padding: 0;
- }
- .talent-tab {
- .title {
- font-size: 36rpx;
- font-weight: 400;
- color: #333333;
- }
- }
- </style>
|