Browse Source

feat: policy uniapp h5 test

王亚超 1 year ago
parent
commit
be31a4d3ab

+ 23 - 1
uniapp/api/app.js

@@ -83,4 +83,26 @@ export function feedback(data) {
 //聚才网获取用户信息
 export function getInfoByToken(data) {
 	return request.post('https://www.jucai.gov.cn/api/auth/getInfoByToken', data)
-}
+}
+
+//人才政策计算器
+export function getSurvey (params) {
+	return request.get('survey', {params})
+}
+export function submitSurvey (data) {
+	return request.post('survey/submit', data)
+}
+export function submitSurveyEnterprise (data) {
+	return request.post('survey/enterprise', data)
+}
+
+export function policyDetail (params) {
+	return request.get('policy/details', {params})
+}
+export function policyCategory (params) {
+	return request.get('policy/category', {params})
+}
+
+export function policyList (params) {
+	return request.get('policy', {params})
+}

+ 7 - 2
uniapp/components/footprint-list/footprint-list.vue

@@ -25,7 +25,7 @@
 							<view class="line-2 flex-1" v-if="item.chain">产业链:{{ item.chain }}</view>
 							<view class="flex" @tap.stop="makePhoneCall(item.tel)">
 								<u-icon name="phone-fill" color="#DD4250" size="28"></u-icon>
-								<view class="m-l-20">{{ item.tel }}</view>
+								<view class="m-l-20">{{ phoneNumHide(item.tel) }}</view>
 							</view>
 						</view>
 						<view class="m-t-16" v-if="item.company">单位:{{ item.company }}</view>
@@ -107,7 +107,12 @@
 		computed: {
 			positionTop() {
 				return (this.statusBarHeight)
-			}
+			},
+            phoneNumHide(tel) {
+                return (tel) => {
+                  return tel.substring(0, 3) + '****' + tel.substring(7);
+                }
+            },
 		},
 		methods: {
 			refresh() {

+ 7 - 2
uniapp/components/search-list/search-list.vue

@@ -24,7 +24,7 @@
 							<view class="line-2 flex-1" v-if="item.chain">产业链:{{ item.chain }}</view>
 							<view class="flex" @tap.stop="makePhoneCall(item.tel)">
 								<u-icon name="phone-fill" color="#DD4250" size="28"></u-icon>
-								<view class="m-l-20">{{ item.tel }}</view>
+								<view class="m-l-20">{{ phoneNumHide(item.tel) }}</view>
 							</view>
 						</view>
 						<view class="m-t-16" v-if="item.company">单位:{{ item.company }}</view>
@@ -111,7 +111,12 @@
 		computed: {
 			positionTop() {
 				return (this.statusBarHeight + 70)
-			}
+			},
+            phoneNumHide(tel) {
+                return (tel) => {
+                  return tel.substring(0, 3) + '****' + tel.substring(7);
+                }
+            },
 		},
 		methods: {
 			refresh() {

+ 12 - 7
uniapp/components/talents-list/talents-list.vue

@@ -24,7 +24,7 @@
                             <view class="line-2 flex-1" v-if="item.chain">产业链:{{ item.chain }}</view>
                             <view class="flex" @tap.stop="makePhoneCall(item.tel)">
                                 <u-icon name="phone-fill" color="#DD4250" size="28"></u-icon>
-                                <view class="m-l-20">{{ item.tel }}</view>
+                                <view class="m-l-20">{{ phoneNumHide(item.tel) }}</view>
                             </view>
                         </view>
                         <view class="m-t-16" v-if="item.company">单位:{{ item.company }}</view>
@@ -97,16 +97,16 @@
             chain: {
                 type: String
             },
-			top: {
-			    type: Number
-			},
+            top: {
+                type: Number
+            },
         },
         created() {
             uni.$on("refreshTalentsList", (params) => {
                 this.params_cid = params.cid;
                 this.params_chain = params.chain;
                 this.params_top = params.top;
-				console.log(params)
+                console.log(params)
                 this.refresh()
             })
             uni.getSystemInfo({
@@ -121,9 +121,14 @@
         },
         computed: {
             positionTop() {
-				return this.top
+                return this.top
                 // return (this.statusBarHeight + 360)
-            }
+            },
+            phoneNumHide(tel) {
+                return (tel) => {
+                  return tel.substring(0, 3) + '****' + tel.substring(7);
+                }
+            },
         },
         methods: {
             refresh() {

+ 2 - 2
uniapp/config/app.js

@@ -16,9 +16,9 @@ const IS_H5 = false
 
 /** S API BaseURL **/
 const baseURLMap = {
-	development: 'https://rcmap.jucai.gov.cn',
+	development: 'https://rencai.jiangzi.xin',
 
-	production: IS_H5 ? location.origin : 'https://rcmap.jucai.gov.cn',
+	production: IS_H5 ? location.origin : 'https://rencai.jiangzi.xin',
 }
 
 const baseURL = SWITCH_DEVELOPMENT ? baseURLMap['development'] : baseURLMap[process.env.NODE_ENV]

+ 75 - 4
uniapp/pages.json

@@ -19,7 +19,7 @@
 			"path": "pages/index/index",
 			"name": "index",
 			"meta": {
-				"auth": true,
+				"auth": false,
 				"keepScroll": true
 			},
 			"style": {
@@ -31,7 +31,7 @@
 			"path": "pages/kanban/kanban",
 			"name": "kanban",
 			"meta": {
-				"auth": true,
+				"auth": false,
 				"keepScroll": true
 			},
 			"style": {
@@ -43,7 +43,7 @@
 			"path": "pages/user/user",
 			"name": "user",
 			"meta": {
-				"auth": true,
+				"auth": false,
 				"keepScroll": true
 			},
 			"style": {
@@ -112,6 +112,66 @@
 			"style": {
 				"navigationBarTitleText": "人才搜索"
 			}
+		},
+		{
+			"path": "pages/policy/index",
+			"meta": {
+				"auth": false
+			},
+			"style": {
+				"navigationBarTitleText": "人才政策计算器",
+                "navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/policy/talent",
+			"meta": {
+				"auth": false
+			},
+			"style": {
+				"navigationBarTitleText": "人才信息"
+			}
+		},
+		{
+			"path": "pages/policy/list",
+			"meta": {
+				"auth": false
+			},
+			"style": {
+				"navigationBarTitleText": "政策AI匹配",
+				"navigationBarBackgroundColor": "#DD4250",
+				"navigationBarTextStyle": "white"
+			}
+		},
+		{
+			"path": "pages/policy/score",
+			"meta": {
+				"auth": false
+			},
+			"style": {
+				"navigationBarTitleText": "测评得分",
+				"navigationBarBackgroundColor": "#DD4250",
+				"navigationBarTextStyle": "white"
+			}
+		},
+		{
+			"path": "pages/policy/detail",
+			"meta": {
+				"auth": false
+			},
+			"style": {
+				"navigationBarTitleText": "政策详情"
+			}
+		},
+		{
+			"path": "pages/policy/search",
+			"meta": {
+				"auth": false
+			},
+			"style": {
+				"navigationBarTitleText": "政策查询",
+                "navigationStyle": "custom"
+			}
 		}
 	],
 	"tabBar": {
@@ -123,14 +183,25 @@
 				"pagePath": "pages/index/index",
 				"iconPath": "/static/images/tab_home.png",
 				"selectedIconPath": "/static/images/tab_home_s.png",
-				"text": "首页"
+				"text": "图谱"
 			},
 			{
+				"pagePath": "pages/policy/index",
+				"iconPath": "/static/images/tab_cal.png",
+				"selectedIconPath": "/static/images/tab_cal_s.png",
+				"text": "计算器"
+			},{
 				"pagePath": "pages/kanban/kanban",
 				"iconPath": "/static/images/tab_kanban.png",
 				"selectedIconPath": "/static/images/tab_kanban_s.png",
 				"text": "看板"
 			},
+            {
+				"pagePath": "pages/policy/search",
+				"iconPath": "/static/images/tab_policy.png",
+				"selectedIconPath": "/static/images/tab_policy_s.png",
+				"text": "政策"
+			},
 			{
 				"pagePath": "pages/user/user",
 				"iconPath": "/static/images/tab_user.png",

+ 127 - 126
uniapp/pages/index/index.vue

@@ -1,136 +1,137 @@
 <template>
 
-	<view>
-		<!-- 头部背景和搜索 -->
-		<view>
-			<image :src="appConfig.mobile_top_bg" class="top-image" id="top-image" mode="widthFix" @load="topImageLoad"></image>
-		</view>
-		<!-- 搜索 -->
-		<router-link to="/pages/search/search" style="position: absolute; width: 100%; padding: 0 98rpx;height: 70rpx;" :style="{top: top + 'rpx'}">
-			<u-search wrap-bg-color="transparent" bg-color="#ffffff" :disabled="false" :height="62" shape="square"
-				:show-action="false"></u-search>
-		</router-link>
-		<!-- 分类树 -->
-		<view class="content bg-body">
-			<cate-two></cate-two>
-		</view>
-
-		<!-- 意见反馈按钮 -->
-		<router-link :to="'/pages/feedback/feedback'"
-			style="width: 200rpx; height: 200rpx; position: fixed; right: 0; bottom: 100rpx; display: none;">
-			<image src="/static/images/icon_feedback.png" style="width: 100%; height: 100%;"></image>
-		</router-link>
-	</view>
+    <view>
+        <!-- 头部背景和搜索 -->
+        <view>
+            <image :src="appConfig.mobile_top_bg" class="top-image" id="top-image" mode="widthFix" @load="topImageLoad">
+            </image>
+        </view>
+        <!-- 搜索 -->
+        <router-link to="/pages/search/search" style="position: absolute; width: 100%; padding: 0 98rpx;height: 70rpx;"
+            :style="{top: top + 'rpx'}">
+            <u-search wrap-bg-color="transparent" bg-color="#ffffff" :disabled="false" :height="62" shape="square"
+                :show-action="false"></u-search>
+        </router-link>
+        <!-- 分类树 -->
+        <view class="content bg-body" v-if="userInfo.nickname">
+            <cate-two></cate-two>
+        </view>
+
+        <!-- 意见反馈按钮 -->
+        <router-link :to="'/pages/feedback/feedback'"
+            style="width: 200rpx; height: 200rpx; position: fixed; right: 0; bottom: 100rpx; display: none;">
+            <image src="/static/images/icon_feedback.png" style="width: 100%; height: 100%;"></image>
+        </router-link>
+    </view>
 
 </template>
 
 <script>
-	import {
-		mapGetters,
-		mapActions
-	} from 'vuex'
-	import {
-		pxToRpx
-	} from '@/utils/tools'
-	const app = getApp()
-	const homeItem = {
-		name: '首页'
-	}
-	export default {
-		data() {
-			return {
-				keyword: '',
-				top: 172
-			}
-		},
-		onShow() {
-			// this.getHomeFun();
-			this.getUser();
-		},
-		onHide() {},
-		onPullDownRefresh() {
-			this.getUser().then(() => {
-				uni.stopPullDownRefresh();
-			})
-		},
-		methods: {
-			...mapActions(['getUser']),
-			topImageLoad(e){
-				setTimeout(() => {
-					uni.createSelectorQuery().in(this).select('#top-image').boundingClientRect(data => {
-						console.log("得到布局位置信息" + JSON.stringify(data));
-						this.top = pxToRpx(data.height) - 100
-					}).exec();
-				},30)
-			},
-			searchTalents() {
-				let {
-					keyword
-				} = this;
-				if (!keyword) {
-					this.$toast({
-						title: '请输入关键字'
-					})
-					return;
-				}
-				uni.navigateTo({
-					url: '/pages/talents/talents?keyword=' + this.keyword
-				})
-			}
-		},
-		computed: {
-
-			...mapGetters(['appConfig']),
-		}
-	}
+    import {
+        mapGetters,
+        mapActions
+    } from 'vuex'
+    import {
+        pxToRpx
+    } from '@/utils/tools'
+    const app = getApp()
+    const homeItem = {
+        name: '首页'
+    }
+    export default {
+        data() {
+            return {
+                keyword: '',
+                top: 172
+            }
+        },
+        onShow() {
+            // this.getHomeFun();
+            this.getUser();
+        },
+        onHide() {},
+        onPullDownRefresh() {
+            this.getUser().then(() => {
+                uni.stopPullDownRefresh();
+            })
+        },
+        methods: {
+            ...mapActions(['getUser']),
+            topImageLoad(e) {
+                setTimeout(() => {
+                    uni.createSelectorQuery().in(this).select('#top-image').boundingClientRect(data => {
+                        console.log("得到布局位置信息" + JSON.stringify(data));
+                        this.top = pxToRpx(data.height) - 100
+                    }).exec();
+                }, 30)
+            },
+            searchTalents() {
+                let {
+                    keyword
+                } = this;
+                if (!keyword) {
+                    this.$toast({
+                        title: '请输入关键字'
+                    })
+                    return;
+                }
+                uni.navigateTo({
+                    url: '/pages/talents/talents?keyword=' + this.keyword
+                })
+            }
+        },
+        computed: {
+            ...mapGetters(['userInfo', 'appConfig']),
+        }
+    }
 </script>
 
 <style lang="scss">
-	page {
-		padding: 0;
-	}
-
-	.top-image {
-		width: 100%;
-	}
-
-	.index-header {
-		background-color: #E8B175;
-		color: #fff;
-
-		.header-text {
-			min-height: 100rpx;
-			text-align: justify;
-		}
-
-		.header-border {
-			border-top: 1px dashed #fff;
-
-		}
-	}
-
-	.class-list {
-		background-color: #fff;
-		color: $-color-primary;
-
-		.class-list-item {
-			padding: 30rpx;
-
-			.item-img {
-				width: 50rpx;
-				height: 50rpx;
-				// padding: 9rpx;
-				// background-color: #E8B175;
-				border-radius: 8rpx;
-
-				image {
-					width: 100%;
-				}
-			}
-		}
-	}
-
-	.count {
-		border-bottom: $-solid-border;
-	}
+    page {
+        padding: 0;
+    }
+
+    .top-image {
+        width: 100%;
+    }
+
+    .index-header {
+        background-color: #E8B175;
+        color: #fff;
+
+        .header-text {
+            min-height: 100rpx;
+            text-align: justify;
+        }
+
+        .header-border {
+            border-top: 1px dashed #fff;
+
+        }
+    }
+
+    .class-list {
+        background-color: #fff;
+        color: $-color-primary;
+
+        .class-list-item {
+            padding: 30rpx;
+
+            .item-img {
+                width: 50rpx;
+                height: 50rpx;
+                // padding: 9rpx;
+                // background-color: #E8B175;
+                border-radius: 8rpx;
+
+                image {
+                    width: 100%;
+                }
+            }
+        }
+    }
+
+    .count {
+        border-bottom: $-solid-border;
+    }
 </style>

+ 121 - 0
uniapp/pages/policy/detail.vue

@@ -0,0 +1,121 @@
+<template>
+    <view class="p-30">
+        <!-- 头部 -->
+        <view class="header flex">
+            <view class="cate-title">{{ item.title }}</view>
+        </view>
+        <!-- 基本信息 -->
+        <view class="talents-item m-t-30">
+            <view class="flex">
+                <view class="">{{ item.author }}</view>
+                <view class="m-l-20">{{timeFormat(item.created_at)}}</view>
+            </view>
+
+        </view>
+        <!-- 简介信息 -->
+        <view class="talents-item m-t-30 m-b-30">
+
+            <view class="m-t-16 item-info">
+                <rich-text :nodes="item.content"></rich-text>
+            </view>
+        </view>
+
+
+
+
+    </view>
+</template>
+
+<script>
+    import {
+        mapActions,
+        mapGetters
+    } from 'vuex'
+    import {
+        policyDetail
+    } from '@/api/app';
+    import {
+        timeFormat
+    } from '@/utils/date';
+    export default {
+        data() {
+            return {
+                statusBarHeight: 0,
+                id: 0, //分类id
+                item: {},
+                // item: {
+                // 	title: '晋江市重点产业紧缺人才计划实施办法',
+                //                 author: '晋江市发展改革委',
+                //                 time: '2023-04-15 11:02',
+                //                 content: '为深入实施创新驱动发展战略,营造有利于创新创业创造的良好发展环境,集聚重点产业高层次紧缺人才,促进主导产业和战略性新兴产业发展,根据《厦门市国民经济和社会发展第十四个五年规划和二〇三五年远景目标纲要》、《关于深化人才发展体制机制改革加快推进人才强市战略的意见》(厦委发〔2017〕16号)及有关政策法规,按照厦门市相关人才计划部署,制定本办法。'
+                // }
+            };
+        },
+        created() {
+            uni.getSystemInfo({
+                success: (res) => {
+                    this.statusBarHeight = res.statusBarHeight;
+                }
+            });
+        },
+        onLoad() {
+            // this.id = 11
+            this.item = uni.getStorageSync('policyDetail');
+            uni.removeStorageSync('policyDetail')
+            if (!this.item) {
+                this.id = this.$Route.query.id;
+                this.getCategoryFun()
+            }
+
+        },
+        onShow() {
+            // this.getUser();
+        },
+        methods: {
+            // ...mapActions(['getUser']),
+            makePhoneCall(tel) {
+                if (tel) {
+                    uni.makePhoneCall({
+                        phoneNumber: tel
+                    });
+                }
+            },
+            async getCategoryFun() {
+                const {
+                    status,
+                    data
+                } = await policyDetail({
+                    id: this.id
+                });
+                if (status == 1) {
+                    this.item = data
+                }
+            },
+            timeFormat(time) {
+                return timeFormat(time)
+            },
+        },
+        computed: {
+            ...mapGetters(['appConfig']),
+        }
+    };
+</script>
+<style lang="scss">
+    page {
+        background-color: #FFFFFF;
+    }
+
+    .header {
+        .cate-title {
+            font-size: 40rpx;
+            font-family: PingFang SC-Medium, PingFang SC;
+            font-weight: bold;
+            color: #282C37;
+        }
+    }
+
+    .talents-item {
+        background: #FFFFFF;
+        font-size: 28rpx;
+    }
+</style>

+ 581 - 0
uniapp/pages/policy/index.vue

@@ -0,0 +1,581 @@
+<template>
+
+    <view>
+        <!-- 头部背景和搜索 -->
+        <view>
+            <image :src="appConfig.mobile_top_bg" class="w-full" mode="widthFix"></image>
+        </view>
+        <!-- tab -->
+        <u-tabs :list="typeList" :is-scroll="false" :bold="true" active-color="#DD4250" height="80" font-size="28"
+            :current="currentTab" @change="changeTab" />
+        <!-- 我是人才 -->
+        <view class="p-70 p-t-40 talent-tab" v-if="currentTab == 0">
+            <view class="flex-col col-center">
+                <view class="title">您所从事的行业:</view>
+                <router-link :to="{ path: '/pages/policy/talent', query: { type: item.type, title: item.title }}" class="m-t-40"
+                    v-for="(item,index) in talentTypeList">
+                    <image :src="item.image" mode="widthFix"></image>
+                </router-link>
+            </view>
+        </view>
+        <!-- 我是企业 -->
+        <view v-if="currentTab == 1">
+            <view class="huodong-details">
+
+                <view class="p-30 ">
+                    <view class="detail-title">
+                        一、企业基本信息
+                    </view>
+                    <view class="content-box bg-white m-t-30">
+                        <view class="detail-cell row-between u-border-bottom">
+                            <view class="width75">
+                                企业名称
+                            </view>
+                            <view class="text-right flex-1">
+                                <input type="text" v-model="info.name" placeholder="请输入">
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom" @tap="pickerShow('estdate')">
+                            <view class="bold">
+                                企业成立日期
+                            </view>
+                            <view class="text-right flex-1">
+                                <text class="muted">{{info.estdate}}</text>
+                                <u-icon name="arrow-right" size="28" color="#B8B8B8" :label="info.estdate ? '' :'请选择'"
+                                    label-pos="left"></u-icon>
+                                <u-picker v-model="show.estdate" mode="time" @confirm="pickerConfirm('estdate', $event)"
+                                    @cancel="pickerCancel('estdate')"></u-picker>
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom">
+                            <view class="bold">
+                                企业注册地
+                            </view>
+                            <view class="text-right flex-1">
+                                <input type="text" v-model="info.address" placeholder="请输入">
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom">
+                            <view class="bold">
+                                企业实际经营地
+                            </view>
+                            <view class="text-right flex-1">
+                                <input type="text" v-model="info.busAddress" placeholder="请输入">
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom">
+                            <view class="bold">
+                                企业有效l类知识产权数
+                            </view>
+                            <view class="text-right flex-1">
+                                <input type="text" v-model="info.propertyNumber" placeholder="请输入">
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom">
+                            <view class="bold" style="width: 400rpx;">
+                                有效、高企认定中未使用过的II类知识产权数
+                            </view>
+                            <view class="text-right flex-1">
+                                <input type="text" v-model="info.propertyNumber2" placeholder="请输入">
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom" @tap="pickerShow('propertyMode')">
+                            <view class="bold">
+                                知识产权获取方式
+                            </view>
+                            <view class="text-right flex-1">
+                                <text class="muted">{{propertyMode.label}}</text>
+                                <u-icon name="arrow-right" size="28" color="#B8B8B8" :label="propertyMode ? '' :'请选择'"
+                                    label-pos="left"></u-icon>
+                                <u-select v-model="show.propertyMode" mode="single-column" :list="propertyModeList"
+                                    @confirm="pickerConfirm('propertyMode', $event)"></u-select>
+
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom" @tap="pickerShow('isStandard')">
+                            <view class="bold" style="width: 400rpx;">
+                                企业参与编制国家标准、行业标准检测方法、技术规范的情况
+                            </view>
+                            <view class="text-right flex-1">
+                                <text class="muted">{{isStandard.label}}</text>
+                                <u-icon name="arrow-right" size="28" color="#B8B8B8" :label="isStandard ? '' :'请选择'"
+                                    label-pos="left"></u-icon>
+                                <u-select v-model="show.isStandard" mode="single-column" :list="isStandardList"
+                                    @confirm="pickerConfirm('isStandard', $event)"></u-select>
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom">
+                            <view class="bold flex" style="width: 400rpx;">
+                                <view>科技成果数</view>
+                                <view class="m-l-8 m-r-8 primary" style="font-size: 20rpx;">科技成果数有效期提示</view>
+                                <u-icon name="info-circle" color="#DD4250"></u-icon>
+                            </view>
+                            <view class="text-right flex-1">
+                                <input type="text" v-model="info.achievementNumber" placeholder="请输入">
+                            </view>
+                        </view>
+                    </view>
+
+                    <view class="detail-title m-t-30">
+                        二、研发组织管理水平评测(多选)
+                    </view>
+                    <view class="content-box m-t-30  bj-w ">
+
+                        <!--  <u-checkbox-group shape="circle" active-color="#DD4250">
+                            <view class="m-t-15 m-b-15" v-for="(item, index) in manageLevelList" :key="index">
+                                <u-checkbox v-model="item.checked" :name="item.name">{{item.name}}</u-checkbox>
+                            </view>
+                        </u-checkbox-group> -->
+
+                        <u-checkbox-group shape="circle" active-color="#DD4250">
+                            <u-checkbox :name="item.name" v-for="(item, index) in manageLevelList" :key="index"
+                                v-model="item.checked" @change="checkboxChange($event)">
+                                {{item.label}}
+                            </u-checkbox>
+                        </u-checkbox-group>
+                    </view>
+
+                    <view class="detail-title m-t-30">
+                        三、企业成长性评测
+                    </view>
+                    <view class="content-box m-t-30  bj-w ">
+                        <view class="detail-title p-t-30">
+                            第一年
+                        </view>
+                        <view class="detail-cell row-between ">
+                            <view class="bold">
+                                净资产(万元)
+                            </view>
+                            <view class="text-right flex-1">
+                                <input type="text" v-model="info.netAssets1" placeholder="请输入">
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom">
+                            <view class="bold">
+                                销售收入(万元)
+                            </view>
+                            <view class="text-right flex-1">
+                                <input type="text" v-model="info.saleRevenue1" placeholder="请输入">
+                            </view>
+                        </view>
+                        <view class="detail-title p-t-30">
+                            第二年
+                        </view>
+                        <view class="detail-cell row-between ">
+                            <view class="bold">
+                                净资产(万元)
+                            </view>
+                            <view class="text-right flex-1">
+                                <input type="text" v-model="info.netAssets2" placeholder="请输入">
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom">
+                            <view class="bold">
+                                销售收入(万元)
+                            </view>
+                            <view class="text-right flex-1">
+                                <input type="text" v-model="info.saleRevenue2" placeholder="请输入">
+                            </view>
+                        </view>
+                        <view class="detail-title p-t-30">
+                            第三年
+                        </view>
+                        <view class="detail-cell row-between ">
+                            <view class="bold">
+                                净资产(万元)
+                            </view>
+                            <view class="text-right flex-1">
+                                <input type="text" v-model="info.netAssets3" placeholder="请输入">
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom">
+                            <view class="bold">
+                                销售收入(万元)
+                            </view>
+                            <view class="text-right flex-1">
+                                <input type="text" v-model="info.saleRevenue3" placeholder="请输入">
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom">
+                            <view class="bold">
+                                验证码
+                            </view>
+                            <view class="text-right flex-1 flex row-right">
+                                <input type="text" v-model="info.code" placeholder="请输入">
+                                <image :src="captchaImg" mode="heightFix" style="height: 54rpx;" class="m-l-10" @tap="refreshCaptcha"></image>
+                            </view>
+                        </view>
+
+
+                    </view>
+                </view>
+
+                <view class="footer">
+                    <button class="white btn lg" @click="handleConsult">提交</button>
+                </view>
+            </view>
+        </view>
+    </view>
+
+</template>
+
+<script>
+    import {
+        mapGetters,
+        mapActions
+    } from 'vuex'
+    import {
+        submitSurveyEnterprise
+    } from '@/api/app';
+    import {
+        getCaptcha
+    } from '@/utils/tools'
+    const app = getApp()
+    export default {
+        data() {
+            return {
+                show: {},
+                propertyModeList: [{
+                    value: 1,
+                    label: '自主研发'
+                }, {
+                    value: 2,
+                    label: '仅有受让、受赠和并购等'
+                }, ],
+                isStandardList: [{
+                    value: 1,
+                    label: '是'
+                }, {
+                    value: 0,
+                    label: '否'
+                }, ],
+                captcha: '',
+                info: {
+                    'name': '',
+                    'address': '',
+                    'estdate': '',
+                    'busAddress': '',
+                    'propertyNumber': '', //企业有效l类知识产权数
+                    'propertyNumber2': '', //有效、高企认定中未使用过的II类知识产权数
+                    'propertyMode': '', //知识产权获取方式 1:自主研发 2:仅有受让、受赠和并购等
+                    'isStandard': '', //企业参与编制国家标准、行业标准、检测方法、技术规范的情况  1:是 0:否
+                    'achievementNumber': '', //科技成果数,
+
+                    'manageLevel1': 0, //定制了企业研究开发组织管理制度
+                    'manageLevel2': 0, //建立了研发投入核算体系
+                    'manageLevel3': 0, //编制了研发费用辅助帐
+                    'manageLevel4': 0, //设立了内部科技技术研究开发机构并具备相应的科研条件
+                    'manageLevel5': 0, //与国内外研究开发机构开展多种形式的产学研合作
+                    'manageLevel6': 0, //建立了科技成果转化的组织实施与激励奖励制度
+                    'manageLevel7': 0, //建立开放式的创新创业平台
+                    'manageLevel8': 0, //建立了科技人员的培养进修制度
+                    'manageLevel9': 0, //建立了职工技能培训制度
+
+                    'netAssets1': '', //第1年   净资产
+                    'netAssets2': '', //第2年   净资产
+                    'netAssets3': '', //第3年   净资产
+                    'saleRevenue1': '', //第1年  销售收入
+                    'saleRevenue2': '', //第2年  销售收入
+                    'saleRevenue3': '' //第3年  销售收入
+                },
+                infoValidate: {
+                    'name': '企业名称',
+                    'address': '企业注册地',
+                    'estdate': '企业成立时间',
+                    'busAddress': '企业实际经营地',
+                    'propertyNumber': '企业有效l类知识产权数', //
+                    'propertyNumber2': '有效、高企认定中未使用过的II类知识产权数', //
+                    'achievementNumber': '科技成果数', //,
+                    'netAssets1': '第1年 净资产', //
+                    'netAssets2': '第2年 净资产', //
+                    'netAssets3': '第3年 净资产', //
+                    'saleRevenue1': '第1年 销售收入', //
+                    'saleRevenue2': '第2年 销售收入', //
+                    'saleRevenue3': '第3年 销售收入' //
+                },
+
+                typeList: [{
+                    name: '我是人才',
+                }, {
+                    name: '我是企业',
+                }],
+                currentTab: 0,
+                talentTypeList: [{
+                    'image': '/static/images/type-1.png',
+                    type: 'industry',
+                    title: '现代产业'
+                }, {
+                    'image': '/static/images/type-2.png',
+                    type: 'education',
+                    title: '高等教育'
+                }, {
+                    'image': '/static/images/type-3.png',
+                    type: 'medical',
+                    title: '医疗卫生'
+                }, {
+                    'image': '/static/images/type-4.png',
+                    type: 'circuit',
+                    title: '集成电路'
+                }, ],
+
+                manageLevelList: [{
+                        label: '1、制定了企业研究开发的组织管理制度',
+                        name: 'manageLevel1',
+                    },
+                    {
+                        label: '2、建立了研发投入核算体系',
+                        name: 'manageLevel2',
+                    },
+                    {
+                        label: '3、编制了研发费用辅组账',
+                        name: 'manageLevel3',
+                    },
+                    {
+                        label: '4、设立了内部科学技术研究开发机构并具备相应的科技',
+                        name: 'manageLevel4',
+                    },
+                    {
+                        label: '5、与国内外研究开发机构开展多种形式产学研合作',
+                        name: 'manageLevel5',
+                    },
+                    {
+                        label: '6、建立了科技成果转化的组织实施与激励奖励制度',
+                        name: 'manageLevel6',
+                    },
+                    {
+                        label: '7、建立开放式的创新创业平台',
+                        name: 'manageLevel7',
+                    },
+                    {
+                        label: '8、建立了科技人员的培养进修制度',
+                        name: 'manageLevel8',
+                    },
+                    {
+                        label: '9、建立了职工技能培训制度',
+                        name: 'manageLevel9',
+                    }
+                ],
+                top: 172
+            }
+        },
+        onLoad() {
+            this.propertyMode = this.propertyModeList[0]
+            this.isStandard = this.isStandardList[0]
+            this.info.propertyMode = this.propertyMode.value
+            this.info.isStandard = this.isStandard.value
+            
+             this.captchaImg = getCaptcha()
+        },
+        onShow() {
+            // this.getHomeFun();
+            // this.getUser();
+        },
+        onHide() {},
+        onPullDownRefresh() {
+            // this.getUser().then(() : {
+            //     uni.stopPullDownRefresh();
+            // })
+        },
+        methods: {
+            refreshCaptcha(){
+                this.captchaImg = getCaptcha()
+                 this.$forceUpdate();
+            },
+            // ...mapActions(['getUser']),
+            // 改变当前的Tabs位置
+            changeTab(index) {
+                this.currentTab = index;
+            },
+            checkboxChange(detail) {
+                this.info[detail.name] = detail.value ? 1 : 0
+            },
+            pickerShow(index) {
+                this.show[index] = true
+                this.$forceUpdate();
+            },
+            pickerConfirm(index, obj) {
+                //日期
+                if (index == 'estdate') {
+                    this.info[index] = obj['year'] + '-' + obj['month'] + '-' + obj['day']
+                } else {
+                    //单选框
+                    this[index] = obj[0]
+                    this.info[index] = obj[0].value
+                }
+                this.$forceUpdate();
+            },
+            pickerCancel(index, obj) {
+                this.show[index] = false
+                this.$forceUpdate();
+            },
+            async handleConsult() {
+                console.log(this.info)
+                //表单必填验证
+                try {
+                    Object.keys(this.infoValidate).forEach((key, index) => {
+                        if (this.info[key] == '') {
+                            throw new Error('请输入' + this.infoValidate[key])
+                        }
+                    })
+                } catch (e) {
+                    this.$toast({
+                        title: e.message
+                    })
+                    return false;
+                }
+                //todo API验证码
+                // if (this.captcha == '' || this.captcha != 'abcd') {
+                //     this.$toast({
+                //         title: '验证码错误'
+                //     })
+                //     return false;
+                // }
+
+                const {
+                    status,
+                    data,
+                    msg
+                } = await submitSurveyEnterprise(this.info);
+
+                if (status == 1) {
+                    uni.setStorageSync('enterpriseScore', data);
+                    uni.navigateTo({
+                        url: '/pages/policy/score'
+                    })
+                }
+            },
+        },
+        computed: {
+            ...mapGetters(['appConfig']),
+        }
+    }
+</script>
+
+<style lang="less" scoped>
+    .huodong-details {
+        padding-bottom: calc(200rpx + env(safe-area-inset-bottom));
+    }
+
+    .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>

+ 274 - 0
uniapp/pages/policy/list.vue

@@ -0,0 +1,274 @@
+<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">匹配成功</view>
+            </view>
+            <view class="flex row-center m-t-14 white p-l-20 p-r-20">根据您的条件AI智能计算可能符合以下政策,具体以实际申报为准</view>
+            <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">
+                        <!-- 标签 -->
+                        <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,
+            }
+        },
+        onLoad(option) {
+           this.policyList = uni.getStorageSync('policyList');
+        },
+        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,
+                })
+            },
+        },
+        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>

+ 398 - 0
uniapp/pages/policy/score.vue

@@ -0,0 +1,398 @@
+<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">企业评测总得分:{{ score.totalScore }}</view>
+            </view>
+            <view class="flex row-center m-t-14 white">国家级高新技术企业认定创新能力测试</view>
+            <view class="m-t-22 p-l-24 p-r-24">
+                <view class="top-line"></view>
+                <view class="list">
+                    <view class="score-item bg-white p-t-18 p-l-24 p-r-24 p-b-34">
+                        <view class="flex row-center text-center primary">
+                            <view>综合得分达70分以上(不含70) 为符合认定要求,最终分数以专家评审为主</view>
+                        </view>
+                        <view class="divider-line"></view>
+                        <view class="detail-title">
+                            一、企业基本信息
+                        </view>
+                        <view class="content-box m-t-30">
+                            <view class="detail-cell row-between u-border-bottom">
+                                <view class="width75">
+                                    企业名称
+                                </view>
+                                <view class="text-right flex-1 primary">
+                                    <text>{{ score.basic.name }}</text>
+                                </view>
+                            </view>
+                            <view class="detail-cell row-between u-border-bottom">
+                                <view class="bold">
+                                    企业成立日期
+                                </view>
+                                <view class="text-right flex-1 primary">
+                                    <text>{{ score.basic.estdate }}</text>
+                                </view>
+                            </view>
+                            <view class="detail-cell row-between u-border-bottom">
+                                <view class="bold">
+                                    企业注册地
+                                </view>
+                                <view class="text-right flex-1 primary">
+                                    <text>{{ score.basic.address }}</text>
+                                </view>
+                            </view>
+                            <view class="detail-cell row-between u-border-bottom">
+                                <view class="bold">
+                                    企业实际经营地
+                                </view>
+                                <view class="text-right flex-1 primary">
+                                    <text>{{ score.basic.busAddress }}</text>
+                                </view>
+                            </view>
+                            <view class="detail-cell row-between">
+                                <view class="bold">
+                                    企业有效l类知识产权数
+                                </view>
+                                <view class="text-right flex-1 primary">
+                                    <text>{{ score.basic.propertyNumber }}</text>
+                                </view>
+                            </view>
+                        </view>
+                        <view class="divider-line"></view>
+                        <view class="detail-title m-t-30">
+                            二、知识产权(总分:30,获得 <text class="primary">{{ score.knowledgeVo.knowledgeTotalScore }}</text> 分)
+                        </view>
+                        <view class="content-box m-t-30  bj-w ">
+                            <view class="detail-cell row-between u-border-bottom">
+                                <view class="bold">
+                                    技术的先进程度(8分)
+                                </view>
+                                <view class="text-right flex-1 primary">
+                                    <text>{{ score.knowledgeVo.techniquesScore }}分</text>
+                                </view>
+                            </view>
+                            <view class="detail-cell row-between u-border-bottom">
+                                <view class="bold">
+                                    对主要产品(服务)在技术上发挥核心支持作用(8分)
+                                </view>
+                                <view class="text-right flex-1 primary">
+                                    <text>{{ score.knowledgeVo.effectScore }}分</text>
+                                </view>
+                            </view>
+                            <view class="detail-cell row-between u-border-bottom">
+                                <view class="bold">
+                                    知识产权数量(8分)
+                                </view>
+                                <view class="text-right flex-1 primary">
+                                    <text>{{ score.knowledgeVo.numberScore }}分</text>
+                                </view>
+                            </view>
+                            <view class="detail-cell row-between u-border-bottom">
+                                <view class="bold">
+                                    知识产权获得方式(6分)
+                                </view>
+                                <view class="text-right flex-1 primary">
+                                    <text>{{ score.knowledgeVo.modeScore }}分</text>
+                                </view>
+                            </view>
+                            <view class="detail-cell row-between">
+                                <view class="bold">
+                                    企业参与编制国家标准、行业标准、检测方法、技术规范的情况(2分)
+                                </view>
+                                <view class="text-right flex-1 primary">
+                                    <text>{{ score.knowledgeVo.standardScore }}分</text>
+                                </view>
+                            </view>
+                        </view>
+                        <view class="divider-line"></view>
+                        <view class="detail-title m-t-30">
+                            三、科技成果转化能力(总分:30,获得 <text class="primary">{{ score.techniquesAchieveScore }}</text>分)
+                        </view>
+                        <view class="divider-line"></view>
+                        <view class="detail-title m-t-30">
+                            四、研究开发组织管理水平(总分:20,获得 <text class="primary">{{ score.manageLevelScore }}</text>分)
+                        </view>
+                        <view class="divider-line"></view>
+                        <view class="detail-title m-t-30">
+                            五、企业成长性(总分:20,获得<text class="primary">{{ score.enterpriseGrowthVo.totalScore }}</text>分)
+                        </view>
+                        <view class="detail-cell row-between u-border-bottom">
+                            <view class="bold">
+                                净资产增长率得分(10分)
+                            </view>
+                            <view class="text-right flex-1 primary">
+                                <text>{{ score.enterpriseGrowthVo.growthRateScore }}分</text>
+                            </view>
+                        </view>
+                        <view class="detail-cell row-between">
+                            <view class="bold">
+                                销售收入增长率得分(10分)
+                            </view>
+                            <view class="text-right flex-1 primary">
+                                <text>{{ score.enterpriseGrowthVo.saleRateScore }}分</text>
+                            </view>
+                        </view>
+
+                    </view>
+
+                    <view class="flex row-center m-t-44 m-b-44">
+                        <navigator class="user-logout flex col-center row-center white" open-type="navigateBack">
+                            <view class="m-r-12">重新测评</view>
+                        </navigator>
+                    </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 {
+            }
+        },
+        onLoad(option) {
+             this.score = uni.getStorageSync('enterpriseScore');
+             console.log(this.score)
+        },
+        onShow() {
+            // this.getHomeFun();
+            // this.getUser();
+        },
+        onHide() {},
+        onPullDownRefresh() {
+        //     this.getUser().then(() => {
+        //         uni.stopPullDownRefresh();
+        //     })
+        },
+        methods: {
+            // ...mapActions(['getUser']),
+            // 改变当前的Tabs位置
+            changeTab(index) {
+                this.currentTab = index;
+            },
+            changeTag(index) {
+                this.activeIndex = index;
+            },
+        },
+        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;
+        }
+
+
+        .divider-line {
+            width: 100%;
+            height: 0rpx;
+            opacity: 1;
+            border: 1rpx dashed #C0C4CC;
+            margin: 38rpx 0;
+        }
+
+        .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;
+
+            .score-item {
+                box-shadow: 0rpx 8rpx 16rpx 2rpx rgba(0, 0, 0, 0.03);
+                border-radius: 0rpx 0rpx 18rpx 18rpx;
+            }
+        }
+
+        .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 {
+            width: 100%;
+            height: 88rpx;
+            background: #DD4250;
+            box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(243, 113, 113, 0.39);
+            border-radius: 18rpx 18rpx 18rpx 18rpx;
+            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;
+
+        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>

+ 339 - 0
uniapp/pages/policy/search.vue

@@ -0,0 +1,339 @@
+<template>
+
+    <view>
+        <!-- 头部背景和搜索 -->
+        <view>
+            <image :src="appConfig.mobile_top_bg" class="top-image" id="top-image" mode="widthFix" @load="topImageLoad">
+            </image>
+        </view>
+        <!-- 搜索 -->
+        <router-link to="/pages/search/search" style="position: absolute; width: 100%; padding: 0 98rpx;height: 70rpx;"
+            :style="{top: searchTop + 'rpx'}">
+            <u-search wrap-bg-color="transparent" bg-color="#ffffff" :disabled="false" :height="62" shape="square"
+                :show-action="false"></u-search>
+        </router-link>
+        <!-- 筛选 -->
+        <view class="flex row-right bg-white p-l-30 p-r-30 p-b-20 p-t-20" @click="show = true">
+            <u-icon name="list-dot" size="28"></u-icon>
+            <view class="m-l-10">筛选</view>
+        </view>
+
+        <!-- 筛选弹出 -->
+        <u-popup v-model="show" mode="right" width="80%" :closeable="true">
+            <view class="p-20">
+                <view v-for="(item, index) in categoryList">
+                    <view>{{ item.description }}</view>
+                    <!-- 标签 -->
+                    <view class="flex flex-wrap">
+                        <view class="tag-item" :class="{ 'tat-active': item.activeIndex == null }"
+                            @tap="changeTag(null, index)">
+                            全部
+                        </view>
+                        <view class="tag-item" :class="{ 'tat-active': item.activeIndex == tagIndex }"
+                            v-for="(tag, tagIndex) in item.data" :key="tagIndex" @tap="changeTag(tagIndex, index)">
+                            {{ tag.name }}
+                        </view>
+                    </view>
+                </view>
+                <view class="confrim-btn flex w-full row-center">
+                    <button class="btn reset lg" @click="resetForm">重置</button>
+                    <button class="white btn lg" @click="refresh">确定</button>
+                </view>
+            </view>
+        </u-popup>
+
+        <!-- 政策列表 -->
+        <view id="main">
+            <mescroll-uni ref="mescrollRef" :top="top" @init="mescrollInit" @down="downCallback" @up="upCallback"
+                :down="downOption" :up="upOption" style="left: 100px;">
+                <view class="p-24">
+                    <view class="item" v-for="(item, index) in policyList" :key="index" @tap="goDetail(item)">
+                        <view class="font-size-28">{{item.title}}</view>
+                        <!-- <view class="flex m-t-20">
+                        <view class="flex-1">阅读次数: 1072次</view>
+                        <view class="flex-1">状态: 有效</view>
+                    </view>
+                    <view class="flex m-t-10">
+                        <view class="flex-1">支持方式: 其他</view>
+                        <view class="flex-1">支持产业: 所有产业</view>
+                    </view>
+                    <view class="flex m-t-10">
+                        <view class="flex-1">发文单位: 科技部火炬中心</view>
+                    </view> -->
+                        <view class="u-border-bottom m-t-20"></view>
+                        <view class="flex row-between p-t-20">
+                            <view class="flex primary">
+                                <u-icon name="star-fill" size="28"></u-icon>
+                                <view class="m-l-10">{{item.author}}</view>
+                            </view>
+                            <view>{{timeFormat(item.created_at)}}</view>
+                        </view>
+                    </view>
+                </view>
+                <loading-view v-if="showLoading" background-color="transparent" :size="50"></loading-view>
+            </mescroll-uni>
+        </view>
+
+    </view>
+
+</template>
+
+<script>
+    import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
+    import MescrollMoreItemMixin from "@/components/mescroll-uni/mixins/mescroll-more-item.js";
+    import {
+        mapGetters,
+        mapActions
+    } from 'vuex'
+    import {
+        policyCategory,
+        policyList
+    } from '@/api/app'
+    import {
+        pxToRpx
+    } from '@/utils/tools'
+    import {
+        timeFormat
+    } from '@/utils/date'
+    const app = getApp()
+    const homeItem = {
+        name: '首页'
+    }
+    export default {
+        mixins: [MescrollMixin, MescrollMoreItemMixin],
+        data() {
+            return {
+                statusBarHeight: 0,
+                keyword: '',
+                top: 0,
+                searchTop: 0,
+                show: false,
+                activeIndex: 0,
+                categoryList: [],
+                policyList: [],
+                downOption: {
+                    // use: false,
+                    auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
+                },
+                upOption: {
+                    auto: true, // 不自动加载
+                    noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
+                    empty: {
+                        icon: '/static/images/order_null.png',
+                        tip: '暂无数据~', // 提示
+                        fixed: true,
+                        top: '100rpx'
+                    }
+                },
+                showLoading: false
+            }
+        },
+        created() {
+            uni.getSystemInfo({
+                success: (res) => {
+                    this.statusBarHeight = res.statusBarHeight;
+                }
+            });
+        },
+        updated: function() {
+            this.$nextTick(() => {
+                //  仅在整个视图都被重新渲染之后才会运行的代码     
+                setTimeout(() => {
+                    uni.createSelectorQuery().in(this).select('#main')
+                        .boundingClientRect(data => {
+                            console.log("得到布局位置信息" + JSON.stringify(data));
+                            this.top = pxToRpx(data.top) 
+                        }).exec();
+
+                }, 30)
+            });
+        },
+        onLoad() {
+            this.getCategoryFun()
+        },
+        onHide() {},
+        onPullDownRefresh() {},
+        methods: {
+            refresh() {
+                this.show = false
+                this.mescroll.resetUpScroll()
+            },
+            //筛选条件
+            async getCategoryFun() {
+                const {
+                    status,
+                    data
+                } = await policyCategory({});
+                if (status == 1) {
+                    this.categoryList = data
+                    console.log(this.categoryList)
+                }
+            },
+            changeTag(tagIndex, index) {
+                this.categoryList[index].activeIndex = tagIndex
+                this.$forceUpdate();
+            },
+            resetForm() {
+                this.categoryList = this.categoryList.map((item, index) => {
+                    item.activeIndex = null
+                    return item
+                })
+            },
+            topImageLoad(e) {
+                setTimeout(() => {
+                    uni.createSelectorQuery().in(this).select('#top-image').boundingClientRect(data => {
+                        console.log("得到布局位置信息" + JSON.stringify(data));
+                        this.searchTop = pxToRpx(data.height) - 100
+                    }).exec();
+                }, 30)
+            },
+            searchTalents() {
+                let {
+                    keyword
+                } = this;
+                if (!keyword) {
+                    this.$toast({
+                        title: '请输入关键字'
+                    })
+                    return;
+                }
+                uni.navigateTo({
+                    url: '/pages/talents/talents?keyword=' + this.keyword
+                })
+            },
+            upCallback(page) {
+                let pageNum = page.num; // 页码, 默认从1开始
+                let pageSize = page.size; // 页长, 默认每页10条
+                let params = {
+                    // page_size: pageSize,
+                    // page_no: pageNum
+                }
+                this.categoryList.forEach((item, index) => {
+                	if (item.activeIndex) {
+                        params[item.name] = item.data[item.activeIndex].value
+                    }
+                })
+                policyList(params).then(({
+                    data,
+                    _meta
+                }) => {
+                    let curPageData = data;
+                    let curPageLen = curPageData.length;
+                    let hasNext = _meta.pageCount > _meta.currentPage;
+                    if (page.num == 1) this.policyList = [];
+                    this.policyList = this.policyList.concat(curPageData);
+                    this.mescroll.endSuccess(curPageLen, hasNext);
+                })
+            },
+            timeFormat(time) {
+                return timeFormat(time)
+            },
+            goDetail(item){
+                // uni.setStorageSync('policyDetail', item);
+                uni.navigateTo({
+                    url: '/pages/policy/detail?id=' + item.id+ '&title=' + item.title,
+                })
+            },
+        },
+        computed: {
+            ...mapGetters(['appConfig']),
+            positionTop() {
+                return this.top
+            },
+        }
+    }
+</script>
+
+<style lang="scss">
+    page {
+        padding: 0;
+    }
+
+    .top-image {
+        width: 100%;
+    }
+
+    .index-header {
+        background-color: #E8B175;
+        color: #fff;
+
+        .header-text {
+            min-height: 100rpx;
+            text-align: justify;
+        }
+
+        .header-border {
+            border-top: 1px dashed #fff;
+
+        }
+    }
+
+    .item {
+        background: #FFFFFF;
+        box-shadow: 0px 8rpx 16rpx 2rpx rgba(0, 0, 0, 0.03);
+        border-radius: 12rpx;
+        opacity: 1;
+        padding: 24rpx 34rpx;
+        margin-bottom: 16rpx;
+    }
+
+    .tag-item {
+        margin: 8rpx;
+        padding: 8rpx 28rpx;
+        background: #F7F8FA;
+        border-radius: 8rpx 8rpx 8rpx 8rpx;
+        opacity: 1;
+    }
+
+
+    .tat-active {
+        color: #FFFFFF;
+        background: #FEEFF5;
+        color: #DD4250;
+        border: 2rpx solid #DD4250;
+    }
+
+    .class-list {
+        background-color: #fff;
+        color: $-color-primary;
+
+        .class-list-item {
+            padding: 30rpx;
+
+            .item-img {
+                width: 50rpx;
+                height: 50rpx;
+                // padding: 9rpx;
+                // background-color: #E8B175;
+                border-radius: 8rpx;
+
+                image {
+                    width: 100%;
+                }
+            }
+        }
+    }
+
+    .count {
+        border-bottom: $-solid-border;
+    }
+
+    .confrim-btn {
+        position: fixed;
+        bottom: 100rpx;
+
+        .btn {
+            padding: 0 80rpx;
+            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;
+        }
+
+        .reset {
+            background-color: #F2F2F2;
+            color: #858585;
+        }
+    }
+</style>

+ 308 - 0
uniapp/pages/policy/talent.vue

@@ -0,0 +1,308 @@
+<template>
+    <view class="huodong-details">
+
+        <view class="p-30 ">
+            <view class="detail-title">
+                {{ title }}
+            </view>
+            <view class="content-box bg-white m-t-30">
+                <view class="detail-cell row-between u-border-bottom" v-for="(item, index) in surveyList"
+                    @tap="pickerShow(item.name)">
+                    <view class="width75">
+                        {{item.description}}
+                    </view>
+                    <view class="text-right flex-1" v-if="item.type == 'radio' || item.type == 'select'">
+                        <text class="muted">{{info[item.name]}}</text>
+                        <u-icon name="arrow-right" size="28" color="#B8B8B8"
+                            :label="info[item.name]!= undefined ? '' :'请选择'" label-pos="left"></u-icon>
+                        <u-picker v-model="show[item.name]" mode="selector" :range="item.value"
+                            @confirm="pickerConfirm(index, $event)" @cancel="pickerCancel(index)"></u-picker>
+                    </view>
+                    <view class="text-right flex-1" v-if="item.type == 'checkbox'">
+                        <u-checkbox-group shape="circle" active-color="#DD4250" :name="item.name"
+                            @change="groupChange(index, $event)">
+                            <u-checkbox :name="value" v-for="(value, key) in item.value" :key="key"
+                                v-model="item.checked[key]">
+                                {{value}}
+                            </u-checkbox>
+                        </u-checkbox-group>
+                    </view>
+					
+					<view class="text-right flex-1" v-if="item.type == 'text'">
+					    <input type="text" v-model="info[item.name]" placeholder="请输入">
+					</view>
+                </view>
+
+
+                <view class="detail-cell row-between u-border-bottom">
+                    <view class="bold">
+                        验证码
+                    </view>
+                    <view class="text-right flex-1 flex row-right">
+                        <input type="text" v-model="info.code" placeholder="请输入">
+                        <image :src="captchaImg" mode="heightFix" style="height: 54rpx;" class="m-l-10"
+                            @tap="refreshCaptcha"></image>
+                    </view>
+                </view>
+
+
+            </view>
+        </view>
+
+        <view class="footer">
+            <button class="white btn lg" @click="handleConsult">提交</button>
+        </view>
+
+    </view>
+
+</template>
+
+<script>
+    import {
+        mapGetters,
+        mapActions
+    } from 'vuex'
+    import {
+        getSurvey,
+        submitSurvey
+    } from '@/api/app';
+    import {
+        getCaptcha
+    } from '@/utils/tools'
+    const app = getApp()
+    export default {
+        data() {
+            return {
+                show: {},
+                surveyList: [],
+                info: {},
+                captcha: '',
+                top: 172,
+                title: '人才信息'
+            }
+        },
+        onLoad(o) {
+            //人才类型
+            this.type = this.$Route.query.type;
+            this.title = this.title = this.$Route.query.title + '人才信息填写';
+            this.getSurvey();
+            this.captchaImg = getCaptcha()
+        },
+        onShow() {
+            uni.setNavigationBarTitle({
+                title: this.title
+            });
+        },
+        onHide() {},
+        onPullDownRefresh() {},
+        methods: {
+            refreshCaptcha() {
+                this.captchaImg = getCaptcha()
+                this.$forceUpdate();
+            },
+            // ...mapActions(['getUser']),
+            groupChange(index, detail) {
+                let item = this.surveyList[index]
+                this.info[item.name] = detail
+            },
+            pickerShow(index) {
+                this.show[index] = true
+                this.$forceUpdate();
+            },
+            pickerConfirm(index, obj) {
+                let item = this.surveyList[index]
+                this.info[item.name] = item.value[obj[0]]
+                this.show[item.name] = false
+                this.$forceUpdate();
+            },
+            pickerCancel(index, obj) {
+                let item = this.surveyList[index]
+                this.show[item.name] = false
+                this.$forceUpdate();
+            },
+            //获取动态表单
+            async getSurvey() {
+                const {
+                    status,
+                    data
+                } = await getSurvey({
+                    type: this.type
+                });
+                if (status == 1) {
+                    this.surveyList = data
+
+                    this.surveyList.map((item, index) => {
+                        // this.show[item.name] = false;
+                        //初始化radio的info
+                        if (item.type == 'radio' || item.type == 'select') {
+                            this.info[item.name] = item.value[0]
+                        }
+                        //checkbox多选判断,初始化checked状态
+                        if (item.type == 'checkbox') {
+                            item.checked = []
+                            console.log(item.value)
+                            item.value.forEach((value, key) => {
+                                item.checked[key] = false
+                            })
+                            return item;
+                        }
+                    })
+                }
+            },
+            //提交表单
+            async handleConsult() {
+                // //todo API验证码
+                // if (this.captcha == '' || this.captcha != 'abcd') {
+                //     this.$toast({
+                //         title: '验证码错误'
+                //     })
+                //     return false;
+                // }
+                const {
+                    status,
+                    data,
+                    msg
+                } = await submitSurvey(this.info);
+                if (status == 1) {
+                    uni.setStorageSync('policyList', data);
+                    uni.navigateTo({
+                        url: '/pages/policy/list',
+                    })
+                }
+            },
+        },
+        computed: {
+
+            ...mapGetters(['appConfig']),
+        }
+    }
+</script>
+
+<style lang="less" scoped>
+    .huodong-details {
+        padding-bottom: calc(200rpx + env(safe-area-inset-bottom));
+    }
+
+    .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: 30rpx;
+        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>

+ 150 - 129
uniapp/pages/talents/detail.vue

@@ -1,143 +1,164 @@
 <template>
-	<view>
-		<!-- 头部 -->
-		<view class="bg-white  header flex row-center">
-			<u-icon name="file-text-fill" color="#DD4250" size="32"></u-icon>
-			<view class="cate-title m-l-10">{{ item.title }}<u-tag :text="item.module" type="error" size="mini" shape="circleRight" /></view>
-		</view>
-		<!-- 基本信息 -->
-		<view class="talents-item m-t-16">
-			<view class="flex">
-				<u-icon name="info-circle-fill" color="#DD4250" size="28"></u-icon>
-				<view class="m-l-20">基本信息</view>
-			</view>
-			<view class="m-t-16 item-info">
-				<!-- 人才 -->
-				<block v-if="item.module == 'talent' || item.module == 'pedigree'">
-					<view class="m-t-16">姓名:{{ item.title }}</view>
-				</block>
-				<block v-else>
-					<view class="m-t-16">名称:{{ item.title }}</view>
-				</block>
-				<view class="m-t-16" v-if="item.company">单位:{{ item.company }}</view>
-				<view class="m-t-16" v-if="item.position">职位:{{ item.position }}</view>
-				<view class="m-t-16" v-if="item.module == 'base'">负责人:{{ item.principal }}</view>
-				<view class="m-t-16" v-if="item.module == 'pedigreeCompany'">法人:{{ item.principal }}</view>
-				<view class="m-t-16" v-if="item.module == 'firm'">秘书长:{{ item.principal }}</view>
-				
-				<view class="flex m-t-16" @tap.stop="makePhoneCall(item.tel)">
-					<u-icon name="phone-fill" color="#DD4250" size="28"></u-icon>
-					<view class="m-l-20">{{ item.tel }}</view>
-				</view>
-				<view class="flex m-t-16">
-					<u-icon name="map-fill" color="#DD4250" size="28"></u-icon>
-					<view class="m-l-20">{{ item.city }}{{ item.address }}</view>
-				</view>
-			</view>
-		</view>
-		<!-- 简介信息 -->
-		<view class="talents-item m-t-16">
-			<view class="flex">
-				<u-icon name="file-text-fill" color="#DD4250" size="28"></u-icon>
-				<text class="m-l-20"></text>
-				<text v-if="item.module == 'talent'">研究领域:</text>
-				<text v-else-if="item.module == 'base'">基地特色:</text>
-				<text v-else-if="item.module == 'university' || item.module == 'association'">研究方向:</text>
-				<text v-else-if="item.module == 'fund'">投资产业领域:</text>
-				<text v-else-if="item.module == 'pedigreeCompany'">主要产品:</text>
-				<text v-else-if="item.module == 'pedigree'">个人简介:</text>
-				<text v-else>简介:</text>
-			</view>
-			<view class="m-t-16 item-info">
-				<rich-text :nodes="item.intro"></rich-text>
-			</view>
-		</view>
+    <view>
+        <!-- 头部 -->
+        <view class="bg-white  header flex row-center">
+            <u-icon name="file-text-fill" color="#DD4250" size="32"></u-icon>
+            <view class="cate-title m-l-10">{{ item.title }}<u-tag :text="item.module" type="error" size="mini"
+                    shape="circleRight" /></view>
+        </view>
+        <!-- 基本信息 -->
+        <view class="talents-item m-t-16">
+            <view class="flex">
+                <u-icon name="info-circle-fill" color="#DD4250" size="28"></u-icon>
+                <view class="m-l-20">基本信息</view>
+            </view>
+            <view class="m-t-16 item-info">
+                <!-- 人才 -->
+                <block v-if="item.module == 'talent' || item.module == 'pedigree'">
+                    <view class="m-t-16">姓名:{{ item.title }}</view>
+                </block>
+                <block v-else>
+                    <view class="m-t-16">名称:{{ item.title }}</view>
+                </block>
+                <view class="m-t-16" v-if="item.company">单位:{{ item.company }}</view>
+                <view class="m-t-16" v-if="item.position">职位:{{ item.position }}</view>
+                <view class="m-t-16" v-if="item.module == 'base'">负责人:{{ item.principal }}</view>
+                <view class="m-t-16" v-if="item.module == 'pedigreeCompany'">法人:{{ item.principal }}</view>
+                <view class="m-t-16" v-if="item.module == 'firm'">秘书长:{{ item.principal }}</view>
 
+                <view class="flex m-t-16">
+                    <u-icon name="phone-fill" color="#DD4250" size="28"></u-icon>
+                    <view class="m-l-20 m-r-20" @tap.stop="makePhoneCall(item.tel)">{{ item.newTel }}</view>
+                    <view @click="phoneNumSwitch">
+                        <u-icon name="eye-fill" color="#DD4250" size="32" v-if="item.tel != item.newTel"></u-icon>
+                        <u-icon name="eye-off" color="#DD4250" size="32" v-else></u-icon>
+                    </view>
+                </view>
+                <view class="flex m-t-16">
+                    <u-icon name="map-fill" color="#DD4250" size="28"></u-icon>
+                    <view class="m-l-20">{{ item.city }}{{ item.address }}</view>
+                </view>
+            </view>
+        </view>
+        <!-- 简介信息 -->
+        <view class="talents-item m-t-16">
+            <view class="flex">
+                <u-icon name="file-text-fill" color="#DD4250" size="28"></u-icon>
+                <text class="m-l-20"></text>
+                <text v-if="item.module == 'talent'">研究领域:</text>
+                <text v-else-if="item.module == 'base'">基地特色:</text>
+                <text v-else-if="item.module == 'university' || item.module == 'association'">研究方向:</text>
+                <text v-else-if="item.module == 'fund'">投资产业领域:</text>
+                <text v-else-if="item.module == 'pedigreeCompany'">主要产品:</text>
+                <text v-else-if="item.module == 'pedigree'">个人简介:</text>
+                <text v-else>简介:</text>
+            </view>
+            <view class="m-t-16 item-info">
+                <rich-text :nodes="item.intro"></rich-text>
+            </view>
+        </view>
 
 
 
-	</view>
+
+    </view>
 </template>
 
 <script>
-	import {
-		mapActions,
-		mapGetters
-	} from 'vuex'
-	import {
-		getTalentsDetail
-	} from '@/api/app';
-	export default {
-		data() {
-			return {
-				statusBarHeight: 0,
-				id: 0, //分类id
-				item: {
-					title: ''
-				}
-			};
-		},
-		created() {
-			uni.getSystemInfo({
-				success: (res) => {
-					this.statusBarHeight = res.statusBarHeight;
-				}
-			});
-		},
-		onLoad() {
-			this.id = this.$Route.query.id;
-			this.getCategoryFun()
-		},
-		onShow() {
-			this.getUser();
-		},
-		methods: {
-			...mapActions(['getUser']),
-			makePhoneCall(tel) {
-				if (tel) {
-					uni.makePhoneCall({
-						phoneNumber: tel
-					});
-				}
-			},
-			async getCategoryFun() {
-				const {
-					status,
-					data
-				} = await getTalentsDetail({
-					id: this.id
-				});
-				if (status == 1) {
-					this.item = data
-				}
-			},
-		},
-		computed: {
-			...mapGetters(['appConfig']),
-		}
-	};
+    import {
+        mapActions,
+        mapGetters
+    } from 'vuex'
+    import {
+        getTalentsDetail
+    } from '@/api/app';
+    export default {
+        data() {
+            return {
+                statusBarHeight: 0,
+                id: 0, //分类id
+                item: {
+                    title: ''
+                }
+            };
+        },
+        created() {
+            uni.getSystemInfo({
+                success: (res) => {
+                    this.statusBarHeight = res.statusBarHeight;
+                }
+            });
+        },
+        onLoad() {
+            this.id = this.$Route.query.id;
+            this.getCategoryFun()
+        },
+        onShow() {
+            this.getUser();
+        },
+        methods: {
+            ...mapActions(['getUser']),
+            makePhoneCall(tel) {
+                if (tel) {
+                    uni.makePhoneCall({
+                        phoneNumber: tel
+                    });
+                }
+            },
+            //隐藏手机号
+            phoneNumHide() {
+                let number = this.item.tel; //获取到手机号码字段
+                let mphone = number.substring(0, 3) + '****' + number.substring(7);
+                this.item.newTel = mphone
+            },
+            phoneNumSwitch() {
+                let number = this.item.tel
+                if (this.item.newTel == number) {
+                    this.phoneNumHide()
+                } else {
+                    this.item.newTel = number
+                }
+                this.$forceUpdate();
+            },
+            async getCategoryFun() {
+                const {
+                    status,
+                    data
+                } = await getTalentsDetail({
+                    id: this.id
+                });
+                if (status == 1) {
+                    this.item = data
+                    this.phoneNumHide()
+                }
+            },
+        },
+        computed: {
+            ...mapGetters(['appConfig']),
+        }
+    };
 </script>
 <style lang="scss">
-	.header {
-		padding: 30rpx;
+    .header {
+        padding: 30rpx;
 
-		.cate-title {
-			font-size: 32rpx;
-			font-weight: 400;
-		}
-	}
+        .cate-title {
+            font-size: 32rpx;
+            font-weight: 400;
+        }
+    }
 
-	.talents-item {
-		background: #FFFFFF;
-		box-shadow: 0rpx 8rpx 16rpx 2rpx rgba(0, 0, 0, 0.03);
-		border-radius: 12rpx 12rpx 12rpx 12rpx;
-		padding: 30rpx;
-		font-size: 28rpx;
+    .talents-item {
+        background: #FFFFFF;
+        box-shadow: 0rpx 8rpx 16rpx 2rpx rgba(0, 0, 0, 0.03);
+        border-radius: 12rpx 12rpx 12rpx 12rpx;
+        padding: 30rpx;
+        font-size: 28rpx;
 
-		.item-info {
-			padding: 20rpx;
-			background: #F7F8FA;
-			border-radius: 8rpx 8rpx 8rpx 8rpx;
-		}
-	}
+        .item-info {
+            padding: 20rpx;
+            background: #F7F8FA;
+            border-radius: 8rpx 8rpx 8rpx 8rpx;
+        }
+    }
 </style>

+ 217 - 216
uniapp/pages/user/user.vue

@@ -1,223 +1,224 @@
 <template>
-	<view>
-		<!-- 头部 -->
-		<view class="user" :style="[background]"></view><!-- end 头部 -->
-		<view class="header">
-			<view class="user-info">
-				<!-- 用户信息 -->
-				<view class="flex row-between w-full">
-					<view class="flex-1 lg">
-						<view class="line-2">{{userInfo.nickname}}</view>
-						<view class="m-t-20 flex">{{userInfo.tel}}</view>
-					</view>
-					<block>
-						<image class="avatar flex-none" mode="widthFix" :src="userInfo.avatar" v-if="userInfo.avatar" />
-						<image class="avatar flex-none" :src="'/static/images/portrait_empty.png'" v-else />
-					</block>
-				</view>
-				<!-- 分割线 -->
-				<view class="m-t-20 m-b-20 user-line"></view>
-				<!-- 统计 -->
-				<view class="flex row-around w-full user-count">
-					<view class="flex-1 flex flex-col col-center" v-for="(item, index) in userInfo.count" :key="index"
-						@tap="menuJump(item)">
-						<view class="lg primary">{{ item.count }}</view>
-						<view>{{ item.title }}</view>
-					</view>
-				</view>
-
-			</view>
-
-
-		</view>
-
-		<!-- 列表 -->
-		<view class="user-opts">
-			<router-link :to="'/pages/user/footprint'" class="flex row-between col-center w-full">
-				<image mode="widthFix" src="/static/images/ico_footprint.png"></image>
-				<view class="flex-1 m-l-24">我的足迹</view>
-				<u-icon name="arrow-right" color="#ABABAB" size="28"></u-icon>
-			</router-link>
-			<!-- 分割线 -->
-			<view class="m-t-16 m-b-16 user-line"></view>
-			<router-link :to="'/pages/user/company'" class="flex row-between col-center w-full">
-				<image mode="widthFix" src="/static/images/ico_company.png"></image>
-				<view class="flex-1 m-l-24">企业反馈</view>
-				<u-icon name="arrow-right" color="#ABABAB" size="28"></u-icon>
-			</router-link>
-			<!-- 分割线 -->
-			<view class="m-t-16 m-b-16 user-line"></view>
-			<router-link :to="'/pages/feedback/feedback'" class="flex row-between col-center w-full">
-				<image mode="widthFix" src="/static/images/ico_feedback.png"></image>
-				<view class="flex-1 m-l-24">意见反馈</view>
-				<u-icon name="arrow-right" color="#ABABAB" size="28"></u-icon>
-			</router-link>
-		</view>
-
-		<!-- 退出 -->
-
-		<view class="footer flex row-center">
-			<view class="user-logout flex col-center row-center white w-full" @tap="logout">
-				<u-icon name="arrow-rightward" size="28"></u-icon>
-				<view class="m-l-24">退出登录</view>
-			</view>
-		</view>
-
-	</view>
+    <view>
+        <!-- 头部 -->
+        <view class="user" :style="[background]"></view><!-- end 头部 -->
+        <view class="header">
+            <view class="user-info">
+                <!-- 用户信息 -->
+                <view class="flex row-between w-full">
+                    <view class="flex-1 lg">
+                        <view class="line-2" v-if="userInfo.nickname">{{userInfo.nickname}} </view>
+                        <router-link to="/pages/login/login" class="line-2" v-else>请登录</router-link>
+                        <view class="m-t-20 flex">{{userInfo.tel}}</view>
+                    </view>
+                    <block>
+                        <image class="avatar flex-none" mode="widthFix" :src="userInfo.avatar" v-if="userInfo.avatar" />
+                        <image class="avatar flex-none" :src="'/static/images/portrait_empty.png'" v-else />
+                    </block>
+                </view>
+                <!-- 分割线 -->
+                <view class="m-t-20 m-b-20 user-line"></view>
+                <!-- 统计 -->
+                <view class="flex row-around w-full user-count">
+                    <view class="flex-1 flex flex-col col-center" v-for="(item, index) in userInfo.count" :key="index"
+                        @tap="menuJump(item)">
+                        <view class="lg primary">{{ item.count }}</view>
+                        <view>{{ item.title }}</view>
+                    </view>
+                </view>
+
+            </view>
+
+
+        </view>
+
+        <!-- 列表 -->
+        <view class="user-opts" v-if="userInfo.nickname">
+            <router-link :to="'/pages/user/footprint'" class="flex row-between col-center w-full">
+                <image mode="widthFix" src="/static/images/ico_footprint.png"></image>
+                <view class="flex-1 m-l-24">我的足迹</view>
+                <u-icon name="arrow-right" color="#ABABAB" size="28"></u-icon>
+            </router-link>
+            <!-- 分割线 -->
+            <view class="m-t-16 m-b-16 user-line"></view>
+            <router-link :to="'/pages/user/company'" class="flex row-between col-center w-full">
+                <image mode="widthFix" src="/static/images/ico_company.png"></image>
+                <view class="flex-1 m-l-24">企业反馈</view>
+                <u-icon name="arrow-right" color="#ABABAB" size="28"></u-icon>
+            </router-link>
+            <!-- 分割线 -->
+            <view class="m-t-16 m-b-16 user-line"></view>
+            <router-link :to="'/pages/feedback/feedback'" class="flex row-between col-center w-full">
+                <image mode="widthFix" src="/static/images/ico_feedback.png"></image>
+                <view class="flex-1 m-l-24">意见反馈</view>
+                <u-icon name="arrow-right" color="#ABABAB" size="28"></u-icon>
+            </router-link>
+        </view>
+
+        <!-- 退出 -->
+
+        <view class="footer flex row-center" v-if="userInfo.nickname">
+            <view class="user-logout flex col-center row-center white w-full" @tap="logout">
+                <u-icon name="arrow-rightward" size="28"></u-icon>
+                <view class="m-l-24">退出登录</view>
+            </view>
+        </view>
+
+    </view>
 </template>
 
 <script>
-	import MescrollCompMixin from "@/components/mescroll-uni/mixins/mescroll-comp";
-	import {
-		mapGetters,
-		mapActions
-	} from 'vuex'
-	import {
-		authLogout
-	} from '@/api/app';
-	import {
-		menuJump
-	} from '@/utils/tools'
-	import Cache from '@/utils/cache'
-	const app = getApp()
-	export default {
-		mixins: [MescrollCompMixin],
-		data() {
-			return {
-				navBg: 0,
-			};
-		},
-
-		onLoad(options) {
-
-			//配置referrer,防止图片403拒绝
-			const oMeta = document.createElement('meta');
-			oMeta.name = "referrer";
-			oMeta.content = "no-referrer"
-			document.getElementsByTagName('head')[0].appendChild(oMeta);
-
-		},
-
-		onShow() {
-			this.getUser();
-		},
-		onPullDownRefresh() {
-			this.getConfig();
-			this.getUser();
-			setTimeout(function() {
-				uni.stopPullDownRefresh();
-			}, 500);
-		},
-		onPageScroll(e) {
-			const top = uni.upx2px(100)
-			const {
-				scrollTop
-			} = e
-			let percent = scrollTop / top > 1 ? 1 : scrollTop / top
-			this.navBg = percent
-		},
-		methods: {
-			...mapActions(['getConfig', 'getUser']),
-			logout() {
-				authLogout().then(res => {
-					if (res.code == 1) {
-						this.$store.commit("logout");
-						this.$toast({
-							title: '退出成功'
-						})
-						setTimeout(() => {
-							this.$Router.replaceAll('/pages/launch/launch')
-						}, 500)
-					}
-				})
-			},
-			menuJump(item) {
-				menuJump(item)
-			},
-		},
-		computed: {
-			...mapGetters(['userInfo', 'appConfig']),
-			background() {
-				const {
-					mobile_user_bg
-				} = this.appConfig
-				console.log(mobile_user_bg)
-				return mobile_user_bg ? {
-					'background-image': `url(${mobile_user_bg})`
-				} : {
-					'background-image': 'url(/static/images/bg.png)'
-				}
-			},
-		}
-	};
+    import MescrollCompMixin from "@/components/mescroll-uni/mixins/mescroll-comp";
+    import {
+        mapGetters,
+        mapActions
+    } from 'vuex'
+    import {
+        authLogout
+    } from '@/api/app';
+    import {
+        menuJump
+    } from '@/utils/tools'
+    import Cache from '@/utils/cache'
+    const app = getApp()
+    export default {
+        mixins: [MescrollCompMixin],
+        data() {
+            return {
+                navBg: 0,
+            };
+        },
+
+        onLoad(options) {
+
+            //配置referrer,防止图片403拒绝
+            const oMeta = document.createElement('meta');
+            oMeta.name = "referrer";
+            oMeta.content = "no-referrer"
+            document.getElementsByTagName('head')[0].appendChild(oMeta);
+
+        },
+
+        onShow() {
+            this.getUser();
+        },
+        onPullDownRefresh() {
+            this.getConfig();
+            this.getUser();
+            setTimeout(function() {
+                uni.stopPullDownRefresh();
+            }, 500);
+        },
+        onPageScroll(e) {
+            const top = uni.upx2px(100)
+            const {
+                scrollTop
+            } = e
+            let percent = scrollTop / top > 1 ? 1 : scrollTop / top
+            this.navBg = percent
+        },
+        methods: {
+            ...mapActions(['getConfig', 'getUser']),
+            logout() {
+                authLogout().then(res => {
+                    if (res.code == 1) {
+                        this.$store.commit("logout");
+                        this.$toast({
+                            title: '退出成功'
+                        })
+                        setTimeout(() => {
+                            this.$Router.replaceAll('/pages/launch/launch')
+                        }, 500)
+                    }
+                })
+            },
+            menuJump(item) {
+                menuJump(item)
+            },
+        },
+        computed: {
+            ...mapGetters(['userInfo', 'appConfig']),
+            background() {
+                const {
+                    mobile_user_bg
+                } = this.appConfig
+                console.log(mobile_user_bg)
+                return mobile_user_bg ? {
+                    'background-image': `url(${mobile_user_bg})`
+                } : {
+                    'background-image': 'url(/static/images/bg.png)'
+                }
+            },
+        }
+    };
 </script>
 <style lang="scss" scoped>
-	page {
-		background: $-color-white;
-	}
-
-	.user {
-		// background-image: #F7F7F7;
-		background-size: 100% auto;
-		background-repeat: no-repeat;
-		height: 424rpx;
-	}
-
-	.header {
-		margin-top: -424rpx;
-		padding: 182rpx 28rpx 0;
-
-		.user-info {
-			background: #FFFFFF;
-			box-shadow: 0px 5px 10px 1px rgba(0, 0, 0, 0.08);
-			border-radius: 8px 8px 8px 8px;
-			padding: 40rpx;
-
-			.avatar {
-				height: 176rpx;
-				width: 176rpx;
-				border-radius: 50%;
-				overflow: hidden;
-				margin-top: -200rpx;
-			}
-
-
-
-			.user-count {
-				color: #5D5D5D;
-			}
-		}
-
-	}
-
-	.user-line {
-		border-bottom: $-solid-border;
-	}
-
-	.user-opts {
-		padding: 50rpx;
-
-		image {
-			width: 70rpx;
-			height: 70rpx;
-		}
-	}
-
-	.footer {
-		position: fixed;
-		bottom: 134rpx;
-		width: 100%;
-
-		.user-logout {
-			margin-left: 176rpx;
-			margin-right: 176rpx;
-			margin-bottom: 36rpx;
-			height: 68rpx;
-			background: #DD4250;
-			box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(243, 113, 113, 0.39);
-			border-radius: 12rpx 12rpx 12rpx 12rpx;
-			opacity: 1;
-			border: 2rpx solid #DD4250;
-		}
-	}
+    page {
+        background: $-color-white;
+    }
+
+    .user {
+        // background-image: #F7F7F7;
+        background-size: 100% auto;
+        background-repeat: no-repeat;
+        height: 424rpx;
+    }
+
+    .header {
+        margin-top: -424rpx;
+        padding: 182rpx 28rpx 0;
+
+        .user-info {
+            background: #FFFFFF;
+            box-shadow: 0px 5px 10px 1px rgba(0, 0, 0, 0.08);
+            border-radius: 8px 8px 8px 8px;
+            padding: 40rpx;
+
+            .avatar {
+                height: 176rpx;
+                width: 176rpx;
+                border-radius: 50%;
+                overflow: hidden;
+                margin-top: -200rpx;
+            }
+
+
+
+            .user-count {
+                color: #5D5D5D;
+            }
+        }
+
+    }
+
+    .user-line {
+        border-bottom: $-solid-border;
+    }
+
+    .user-opts {
+        padding: 50rpx;
+
+        image {
+            width: 70rpx;
+            height: 70rpx;
+        }
+    }
+
+    .footer {
+        position: fixed;
+        bottom: 134rpx;
+        width: 100%;
+
+        .user-logout {
+            margin-left: 176rpx;
+            margin-right: 176rpx;
+            margin-bottom: 36rpx;
+            height: 68rpx;
+            background: #DD4250;
+            box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(243, 113, 113, 0.39);
+            border-radius: 12rpx 12rpx 12rpx 12rpx;
+            opacity: 1;
+            border: 2rpx solid #DD4250;
+        }
+    }
 </style>

BIN
uniapp/static/images/list-bg.png


BIN
uniapp/static/images/tab_cal.png


BIN
uniapp/static/images/tab_cal_s.png


BIN
uniapp/static/images/tab_policy.png


BIN
uniapp/static/images/tab_policy_s.png


BIN
uniapp/static/images/type-1.png


BIN
uniapp/static/images/type-2.png


BIN
uniapp/static/images/type-3.png


BIN
uniapp/static/images/type-4.png


+ 149 - 140
uniapp/store/modules/app.js

@@ -1,163 +1,172 @@
 import {
-	getInfoByToken,
-	authLogin,
-	getConfig
+    getInfoByToken,
+    authLogin,
+    getConfig
 } from '@/api/app';
 import {
-	USER_INFO,
-	TOKEN,
-	CONFIG
+    USER_INFO,
+    TOKEN,
+    CONFIG
 } from '@/config/cachekey';
 import Cache from '@/utils/cache'
 import wechath5 from '@/utils/wechath5'
 import {
-	baseURL,
-	basePath
+    baseURL,
+    basePath
 } from '@/config/app'
 
 
 const state = {
-	config: Cache.get(CONFIG) || {
-		center_setting: {},
-		index_setting: {},
-		navigation_menu: [],
-		navigation_setting: {},
-		share: {}
-	},
-	userInfo: Cache.get('USERINFO') || {},
-	token: Cache.get(TOKEN) || null,
-	sysInfo: {},
+    config: Cache.get(CONFIG) || {
+        center_setting: {},
+        index_setting: {},
+        navigation_menu: [],
+        navigation_setting: {},
+        share: {}
+    },
+    userInfo: Cache.get('USERINFO') || {},
+    token: Cache.get(TOKEN) || null,
+    sysInfo: {},
 };
 
 const mutations = {
-	login(state, opt) {
-		console.log('登录成功')
-		console.log(opt)
-		state.token = opt.token;
-		Cache.set(TOKEN, opt.token, 2 * 60 * 60); //保存2小时
-		this.dispatch('getUser')
-	},
-	logout(state) {
-		state.token = undefined;
-		state.userInfo = undefined;
-		Cache.remove(TOKEN);
-		Cache.remove('USERINFO');
-		Cache.remove('USERINFOLIST');
-	},
-	setUserInfo(state, userInfo) {
-		state.userInfo = userInfo;
-		Cache.set('USERINFO', userInfo, 2 * 60 * 60);
-	},
-	setConfig(state, data) {
-		state.config = Object.assign(state.config, data)
-		Cache.set(CONFIG, state.config);
-	},
-	setSystemInfo(state, data) {
-		state.sysInfo = data
-	}
+    login(state, opt) {
+        console.log('登录成功')
+        console.log(opt)
+        state.token = opt.token;
+        Cache.set(TOKEN, opt.token, 2 * 60 * 60); //保存2小时
+        this.dispatch('getUser')
+    },
+    logout(state) {
+        state.token = undefined;
+        state.userInfo = undefined;
+        Cache.remove(TOKEN);
+        Cache.remove('USERINFO');
+        Cache.remove('USERINFOLIST');
+    },
+    setUserInfo(state, userInfo) {
+        state.userInfo = userInfo;
+        Cache.set('USERINFO', userInfo, 2 * 60 * 60);
+    },
+    setConfig(state, data) {
+        state.config = Object.assign(state.config, data)
+        Cache.set(CONFIG, state.config);
+    },
+    setSystemInfo(state, data) {
+        state.sysInfo = data
+    }
 };
 
 const actions = {
-	getUser({
-		state,
-		commit
-	}) {
-		return new Promise(resolve => {
-			getInfoByToken().then(res => {
-				//token 过期,重新登录
-				if (res.code == 2) {
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
-					return false;
-				}
-				if (res.code == 1) {
-					//个人用户,拒绝访问
-					if (res.data.type == 1) {
-						uni.showToast({
-							icon: 'none',
-							title: '仅对企业开放',
-							complete: () => {
-								uni.navigateTo({
-									url: '/pages/login/login'
-								})
-							}
-						})
-						return false;
-					}
-					//企业用户
-					if (res.data.type == 2) {
-						authLogin(res.data).then(auth => {
-							commit('setUserInfo', auth.data)
-						});
-					}
+    getUser({
+        state,
+        commit
+    }) {
+        return new Promise(resolve => {
+            getInfoByToken().then(res => {
+                //token 过期,重新登录
+                if (res.code == 2) {
+                    uni.showModal({
+                        title: '提示',
+                        content: '请使用企业身份登录',
+                        mask: false,
+                        success: function(res) {
+                            if (res.confirm) {
+                                uni.navigateTo({
+                                    url: '/pages/login/login'
+                                })
+                            }
+                        }
+                    })
+                    return false;
+                }
+                if (res.code == 1) {
+                    //个人用户,拒绝访问
+                    if (res.data.type == 1) {
+                        uni.showToast({
+                            icon: 'none',
+                            title: '仅对企业开放',
+                            complete: () => {
+                                uni.navigateTo({
+                                    url: '/pages/login/login'
+                                })
+                            }
+                        })
+                        return false;
+                    }
+                    //企业用户
+                    if (res.data.type == 2) {
+                        authLogin(res.data).then(auth => {
+                            commit('setUserInfo', auth.data)
+                        });
+                    }
 
-				}
-				resolve()
-			})
-		})
-	},
-	getConfig({
-		state,
-		commit
-	}) {
-		return new Promise(resolve => {
-			getConfig({}).then(res => {
-				if (res.status == 1) {
-					commit('setConfig', res.data)
-				}
-				resolve()
-			})
-		})
-	},
-	getSystemInfo({
-		state,
-		commit
-	}) {
-		uni.getSystemInfo({
-			success: res => {
-				let {
-					statusBarHeight,
-					platform,
-				} = res;
-				let navHeight;
-				if (platform == 'ios' || platform == 'devtools') {
-					navHeight = statusBarHeight + 44;
-				} else {
-					navHeight = statusBarHeight + 48;
-				}
-				commit('setSystemInfo', {
-					...res,
-					navHeight,
-				})
-			},
-			fail(err) {
-				console.log(err);
-			}
-		});
-	},
-	wxShare({
-		state
-	}, opt) {
-		// #ifdef H5
-		const shareInfo = state.config.share
-		const inviteCode = state.userInfo.distribution_code
-		const href = window.location.href
-		const sym = href.includes('?') ? '&' : '?'
-		const option = {
-			shareTitle: shareInfo.h5_share_title,
-			shareLink: inviteCode ? `${href}${sym}invite_code=${inviteCode}` : href,
-			shareImage: shareInfo.h5_share_image,
-			shareDesc: shareInfo.h5_share_intro
-		}
-		wechath5.share(Object.assign(option, opt))
-		// #endif
+                }
+                resolve()
+            })
+        })
+    },
+    getConfig({
+        state,
+        commit
+    }) {
+        return new Promise(resolve => {
+            getConfig({}).then(res => {
+                if (res.status == 1) {
+                    commit('setConfig', res.data)
+                }
+                resolve()
+            })
+        })
+    },
+    getSystemInfo({
+        state,
+        commit
+    }) {
+        uni.getSystemInfo({
+            success: res => {
+                let {
+                    statusBarHeight,
+                    platform,
+                } = res;
+                let navHeight;
+                if (platform == 'ios' || platform == 'devtools') {
+                    navHeight = statusBarHeight + 44;
+                } else {
+                    navHeight = statusBarHeight + 48;
+                }
+                commit('setSystemInfo', {
+                    ...res,
+                    navHeight,
+                })
+            },
+            fail(err) {
+                console.log(err);
+            }
+        });
+    },
+    wxShare({
+        state
+    }, opt) {
+        // #ifdef H5
+        const shareInfo = state.config.share
+        const inviteCode = state.userInfo.distribution_code
+        const href = window.location.href
+        const sym = href.includes('?') ? '&' : '?'
+        const option = {
+            shareTitle: shareInfo.h5_share_title,
+            shareLink: inviteCode ? `${href}${sym}invite_code=${inviteCode}` : href,
+            shareImage: shareInfo.h5_share_image,
+            shareDesc: shareInfo.h5_share_intro
+        }
+        wechath5.share(Object.assign(option, opt))
+        // #endif
 
-	}
+    }
 };
 
 export default {
-	state,
-	mutations,
-	actions
+    state,
+    mutations,
+    actions
 };

+ 5 - 0
uniapp/utils/tools.js

@@ -387,3 +387,8 @@ export function pxToRpx(px) {
   const screenWidth = uni.getSystemInfoSync().screenWidth
   return (750 * Number.parseInt(px)) / screenWidth
 }
+
+
+export function getCaptcha() {
+    return baseURL + '/api/v1/survey/captcha?t=' + new Date().getTime()
+}