Tang 3 years ago
parent
commit
52201ef2c7

+ 2 - 0
common/api.js

@@ -15,6 +15,7 @@ import myStudent from './httpList/myStudent.js'
 import order from './httpList/order.js'
 import informUser from './httpList/informUser.js'
 import study from './httpList/study.js'
+import profileTp from './httpList/profileTp.js'
 export default {
 	...login,
 	...polyvVideo,
@@ -33,4 +34,5 @@ export default {
 	...order,
 	...informUser,
 	...study,
+	...profileTp
 }

+ 9 - 0
common/httpList/oss.js

@@ -19,4 +19,13 @@ export default {
 			// noToken: true
 		})
 	},
+	//上传图片
+	aliyunpolicyupload(data) {
+		return myRequest({
+			url: '/aliyun/oss/upload',
+			method: 'post',
+			data: data
+			// noToken: true
+		})
+	},
 }

+ 45 - 0
common/httpList/profileTp.js

@@ -0,0 +1,45 @@
+import {
+	myRequest
+} from '../request.js'
+export default {
+	//新增资料模板
+	addbaseprofiletp(data) {
+		return myRequest({
+			url: '/base/profile/tp',
+			method: 'post',
+			data: data
+		})
+	},
+	//修改资料模板
+	editbaseprofiletp(data) {
+		return myRequest({
+			url: '/base/profile/tp/edit',
+			method: 'post',
+			data: data
+		})
+	},
+	//获取所有使用商品ID
+	getbaseprofiletplist(data) {
+		return myRequest({
+			url: '/base/profile/tp/goods_list',
+			method: 'get',
+			data: data
+		})
+	},
+	//查询资料模板列表
+	getbaseprofiletplists(data) {
+		return myRequest({
+			url: '/base/profile/tp/list',
+			method: 'get',
+			data: data
+		})
+	},
+	//获取资料模板详细信息
+	getbaseprofiletpId(data) {
+		return myRequest({
+			url: '/base/profile/tp/' + data,
+			method: 'get'
+		})
+	},
+
+}

+ 92 - 13
common/methodTool.js

@@ -1,10 +1,13 @@
 import store from '@/store/index.js'
 import * as baseUrls from '@/common/request.js'
+import api from '@/common/api.js'
 // export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'
 export default {
-	isGoLogin(isBack=true) {
+	isGoLogin(isBack = true) {
 		if (!uni.getStorageSync('user_account')) {
-			uni.navigateTo({url:'/pages/login/login?isBack='+isBack});
+			uni.navigateTo({
+				url: '/pages/login/login?isBack=' + isBack
+			});
 			return true;
 		} else {
 			return false
@@ -31,20 +34,19 @@ export default {
 		}, 500)
 	},
 	//图片路径填补
-	splitImgHost(url,scale=false,width=250) {
+	splitImgHost(url, scale = false, width = 250) {
 		if (!url) {
 			return ''
-		}
-		else if (url.indexOf("http") != -1 || url.indexOf("https") != -1) {
-			
-		}else{
+		} else if (url.indexOf("http") != -1 || url.indexOf("https") != -1) {
+
+		} else {
 			url = baseUrls.BASE_IMG_URL + url
 		}
-		if(scale){
-			url = url+"?x-oss-process=image/resize,w_"+width
+		if (scale) {
+			url = url + "?x-oss-process=image/resize,w_" + width
 		}
 		return url;
-		
+
 	},
 	exit() {
 		uni.removeStorageSync('user_account')
@@ -64,7 +66,7 @@ export default {
 		var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
 		var D = date.getDate() < 10 ? '0' + date.getDate() + ' ' : date.getDate() + ' ';
 		var h = date.getHours() < 10 ? '0' + date.getHours() + ':' : date.getHours() + ':';
-		var m = date.getMinutes() < 10 ? '0' + date.getMinutes() + ':': date.getMinutes() + ':';
+		var m = date.getMinutes() < 10 ? '0' + date.getMinutes() + ':' : date.getMinutes() + ':';
 		var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
 		if (isDay) {
 			return Y + M + D;
@@ -112,8 +114,85 @@ export default {
 		tmp = tmp.substr(0, 10);
 		return tmp;
 	},
+	//压缩图片
+	imageInfos(url) {
+		var self = this;
+		return new Promise((resolve, reject) => {
+			uni.getImageInfo({
+				src: url,
+				success: async res => {
+					let canvasWidth = res.width; //图片原始长宽
+					let canvasHeight = res.height;
+					if (canvasWidth > 1000 || canvasHeight > 1000) {
+						uni.compressImage({
+							src: url,
+							quality: 75,
+							width: '50%',
+							height: '50%',
+							success: rest => {
+								resolve(rest.tempFilePath);
+							}
+						});
+					} else {
+						console.log('无需压缩', url);
+						resolve(url);
+					}
+				}
+			});
+		});
+	},
+	//上传图片
+	uploadFile(options, int) {
+		return new Promise((resolve, reject) => {
+			var self = this;
+			if (options.indexOf('http://tmp/') === -1) {
+				resolve(options)
+			}
+			var data = {
+				imageStatus: int
+			};
+			api.aliyunpolicy(data).then(res => {
+				var ossToken = res.data.data.resultContent;
+				uni.uploadFile({
+					url: ossToken.host,
+					name: 'file',
+					filePath: options,
+					fileType: 'image',
+					header: {
+						AuthorizationToken: 'WX ' + uni.getStorageSync('token')
+					},
+					formData: {
+						key: ossToken.dir,
+						OSSAccessKeyId: ossToken.accessid,
+						policy: ossToken.policy,
+						Signature: ossToken.signature,
+						callback: ossToken.callback,
+						success_action_status: 200
+					},
+					success: result => {
+						if (result.statusCode === 200) {
+							resolve(ossToken.dir);
+						} else {
+							uni.showToast({
+								title: '上传失败',
+								icon: 'none'
+							});
+							return;
+						}
+					},
+					fail: error => {
+						uni.showToast({
+							title: '上传接口报错',
+							icon: 'none'
+						});
+						return;
+					}
+				});
+			});
+		});
+	},
 	getYears(strBirthday) {
-		
+
 		if (!strBirthday) {
 			return '-';
 		}
@@ -126,7 +205,7 @@ export default {
 		var nowYear = d.getFullYear();
 		var nowMonth = d.getMonth() + 1;
 		var nowDay = d.getDate();
-	
+
 		if (nowYear == birthYear) {
 			returnAge = 0; //同年 则为0岁
 		} else {

+ 10 - 0
pages.json

@@ -389,6 +389,16 @@
 					}
 				}
 			},
+			{
+				"path": "verify/input2",
+				"style": {
+					"navigationBarTitleText": "填写审核资料",
+					"app-plus": {
+						"titleNView": false, //禁用原生导航栏 
+						"bounce": "none"
+					}
+				}
+			},
 			{
 				"path": "appointment/index",
 				"style": {

+ 1 - 1
pages/course/index.vue

@@ -53,7 +53,7 @@
 							</view>
 						</view>
 					</navigator>
-					<view class="emptyTip" v-if="list2.length==0">暂未上架相关网课~</view>
+					<view class="emptyTip" v-if="list1.length==0">暂未上架相关网课~</view>
 				</view>
 			</view>
 			<view v-show="current==1">

+ 189 - 70
pages2/msg/detail.vue

@@ -1,40 +1,54 @@
 <template>
 	<view style="padding: 20rpx;">
 		<view class="item">
-			<view class="title">{{listData.informVo.informName}}</view>
+			<view class="title">{{ listData.systemStatus === 2 ? listData.informVo.informName : listData.systemStatus === 1 ? listData.remind : '' }}</view>
 			<view class="time">{{ $method.timestampToTime(listData.sendTime, false) }}</view>
-			<view class="content" v-html="listData.informVo.affiche"  style="width: 100%;">
+			<view v-if="listData.systemStatus === 2" class="content" v-html="listData.informVo.affiche" style="width: 100%;"></view>
+			<view v-if="listData.systemStatus === 1" class="content" style="width: 100%;">{{ listData.text }}</view>
+			<view class="boxstistyle">
+				<view class="lsow" style="border-bottom: 1rpx solid #eee;margin-top: 10rpx;" v-for="(item, index) in listData.informVo.informCourseVo" :key="index">
+					<view class="h4">{{ item.goodsName }}</view>
+					<view class="h33">
+						{{ item.courseName }}{{ item.moduleName ? '/' + item.moduleName : '' }}{{ item.chapterName ? '/' + item.chapterName : '' }}{{ item.sectionName }}
+					</view>
+					<view style="display: flex;align-items: center;margin:28rpx 0rpx;">
+						<image style="width: 35rpx;height: 35rpx;" src="@/static/courseIcon.png" mode=""></image>
+						<text class="timeStys">第{{ item.topicNum }}分钟</text>
+						<text class="aSty" @click="jumpSection(item)">点击可直接跳转</text>
+					</view>
+				</view>
+				<view class="lsow" style="border-bottom: 1rpx solid #eee;margin-top: 10rpx;" v-for="(item, index) in listData.informVo.informExamVo" :key="index">
+					<view class="h4">{{ item.goodsName }}</view>
+					<view class="h33">{{ item.moduleName ? '/' + item.moduleName : '' }}{{ item.chapterName ? '/' + item.chapterName : '' }}{{ item.examName }}</view>
+					<view style="display: flex;align-items: center;margin:28rpx 0rpx;">
+						<image style="width: 35rpx;height: 35rpx;" src="@/static/examIcon.png" mode=""></image>
+						<text class="timeStys">第{{ item.topicNum }}道题</text>
+						<text class="aSty" @click="jumpSection(item)">点击可直接跳转</text>
+					</view>
+				</view>
 			</view>
 		</view>
-		<view class="btn1" @click="isOk" v-if="listData.receiptStatus === 0">
-			我已阅读
-		</view>
-		<view class="btn1" @click="backPage" v-if="listData.receiptStatus === 1">
-			返回
-		</view>
+		<view class="btn1" @click="isOk" v-if="listData.systemStatus === 2 && listData.receiptStatus === 0">我已阅读</view>
+		<view class="btn1" v-if="listData.systemStatus === 1 && getNames(listData.remindId) !== ''" @click="jumpFuns(listData)">{{ getNames(listData.remindId) }}</view>
 	</view>
 </template>
 
 <script>
-
 import { mapGetters } from 'vuex';
 export default {
-	components: {
-		
-	},
+	components: {},
 	data() {
 		return {
-			listData:{},
-			id:null,
-			img1:'/static/icon/msg_icon1.png',
-			img2:'/static/icon/msg_icon2.png'
+			listData: {},
+			id: null,
+			img1: '/static/icon/msg_icon1.png',
+			img2: '/static/icon/msg_icon2.png'
 		};
 	},
-	onPullDownRefresh(){
-	},
+	onPullDownRefresh() {},
 	onLoad(option) {
-		this.id = Number(option.id)
-		this.getInfo()
+		this.id = Number(option.id);
+		this.getInfo();
 	},
 	onShow() {
 		/* if(this.current === 2 && this.$method.isLogin()){
@@ -49,73 +63,178 @@ export default {
 		};
 	},
 	methods: {
-		isOk(){
-			this.$api.courseappinformUser({id:this.listData.id,receiptStatus:1}).then(res => {
-				if(res.data.code === 200){
+		//跳转页面
+		jumpFuns(item){
+			switch (item.remindId) {
+				case 1:
+				case 3:
+				case 5:
+				case 6:
+				case 7:
+				case 19:
+				case 21:
+				case 22:
+					// arsty = '立刻学习';
+					break;
+				case 2:
+				case 4:
+					this.$navTo.togo('/pages2/verify/input');
+					break;
+				case 10:
+				case 12:
+				case 18:
+					// arsty = '立即重学';
+					break;
+				case 11:
+					// arsty = '立即预约';
+					break;
+				case 13:
+					// arsty = '预约考试';
+					break;
+				case 20:
+					// arsty = '重新购买';
+					break;
+				default:
+					break;
+			}
+		},
+		//跳转节视频
+		jumpSection(item) {
+			console.log(item);
+		},
+		//跳转题库题目
+		jumpExam(item) {
+			console.log(item);
+		},
+		isOk() {
+			this.$api.courseappinformUser({ id: this.listData.id, receiptStatus: 1 }).then(res => {
+				if (res.data.code === 200) {
 					uni.navigateBack({
-					    delta: 1
+						delta: 1
 					});
 				}
-			})
+			});
 		},
-		backPage(){
+		backPage() {
 			uni.navigateBack({
-			    delta: 1
+				delta: 1
 			});
 		},
-		getInfo(){
+		getInfo() {
 			this.$api.getappinformUserId(this.id).then(res => {
-				if(res.data.code === 200){
-					res.data.data.informVo.affiche = res.data.data.informVo.affiche.replace(/<img/gi,'<img style="max-width:100%;"')
-				this.listData = res.data.data
+				if (res.data.code === 200) {
+					if (res.data.data.informVo && res.data.data.informVo.affiche) {
+						res.data.data.informVo.affiche = res.data.data.informVo.affiche.replace(/<img/gi, '<img style="max-width:100%;"');
+					}
+					this.listData = res.data.data;
 				}
-			})
+			});
 		},
-		change(index){
+		change(index) {
 			this.current = index;
+		},
+		getNames(int) {
+			var arsty = '';
+			switch (int) {
+				case 1:
+				case 3:
+				case 5:
+				case 6:
+				case 7:
+				case 19:
+				case 21:
+				case 22:
+					arsty = '立刻学习';
+					break;
+				case 2:
+				case 4:
+					arsty = '马上填写';
+					break;
+				case 10:
+				case 12:
+				case 18:
+					arsty = '立即重学';
+					break;
+				case 11:
+					arsty = '立即预约';
+					break;
+				case 13:
+					arsty = '预约考试';
+					break;
+				case 20:
+					arsty = '重新购买';
+					break;
+				default:
+					break;
+			}
+			return arsty;
 		}
 	},
 	onReachBottom() {},
 	computed: { ...mapGetters(['userInfo']) }
 };
 </script>
-<style >
-	page {
-			background: #EAEEF1;
-		}
+<style>
+page {
+	background: #eaeef1;
+}
 </style>
 <style scoped>
-	.content{
-		font-size: 28rpx;
-		color: #666666;
-		line-height: 36rpx;
-	}
-	.time{
-		font-size: 24rpx;
-		color: #999999;
-		margin: 15rpx 0;
-	}
-	.btn1{
-		width: 526rpx;
-		height: 80rpx;
-		background: #007AFF;
-		border-radius: 40rpx;
-		color: #FFFFFF;
-		font-size: 30rpx;
-		font-weight: bold;
-		text-align: center;
-		line-height: 80rpx;
-		margin: 30rpx auto;
-	}
-.item{
-		width: 100%;
-		background: #FFFFFF;
-		border-radius: 16rpx;
-		padding: 15rpx;
-	}
-	.title{
-		font-size: 30rpx;
-		font-weight: bold;
-		color: #333333;
-	}
+.lsow:last-child {
+	border-bottom: none !important;
+}
+.timeStys {
+	margin: 0rpx 6rpx;
+	color: #007aff;
+	font-size: 28rpx;
+	font-weight: bold;
+	border-bottom: 1rpx solid #007aff;
+}
+.h4 {
+	color: #333;
+	font-size: 28rpx;
+	font-weight: bold;
+}
+.aSty {
+	color: #999;
+	font-size: 24rpx;
+	margin-left: 8rpx;
+}
+.h33 {
+	font-size: 28rpx;
+	color: #666;
+}
+.content {
+	font-size: 28rpx;
+	color: #666666;
+	line-height: 36rpx;
+}
+.time {
+	font-size: 24rpx;
+	color: #999999;
+	margin: 15rpx 0;
+}
+.btn1 {
+	width: 526rpx;
+	height: 80rpx;
+	background: #007aff;
+	border-radius: 40rpx;
+	color: #ffffff;
+	font-size: 30rpx;
+	font-weight: bold;
+	text-align: center;
+	line-height: 80rpx;
+	margin: 30rpx auto;
+}
+.item {
+	width: 100%;
+	background: #ffffff;
+	border-radius: 16rpx;
+	padding: 15rpx;
+}
+.title {
+	font-size: 30rpx;
+	font-weight: bold;
+	color: #333333;
+}
 </style>

+ 13 - 8
pages2/msg/index.vue

@@ -10,7 +10,9 @@
 					<view style="color: #999999;font-size: 24rpx;">{{ $method.timestampToTime(item.sendTime, false) }}</view>
 				</view>
 				<u-line color="#D6D6DB" />
-				<view style="display: flex;justify-content: space-between;padding: 25rpx;color: #666666;">{{ item.informVo.informName }}</view>
+				<view style="display: flex;justify-content: space-between;padding: 25rpx;color: #666666;">
+					{{ item.systemStatus === 2 ? item.informVo.informName : item.systemStatus === 1 ? item.text : '接口异常' }}
+				</view>
 				<u-line color="#D6D6DB" />
 				<view style="display: flex;justify-content: space-between;align-items: center;height: 50rpx;margin-top: 10rpx;padding: 0 25rpx;">
 					<view class="color: #333333;font-size: 28rpx;">查看详情</view>
@@ -46,13 +48,16 @@ export default {
 		};
 	},
 	onPullDownRefresh() {
-		this.$api.getappinformUserlist().then(res => {
-			if (res.data.code === 200) {
-				this.listData = res.data.rows;
-			}
-		}).finally(()=>{
-        uni.stopPullDownRefresh()
-      })
+		this.$api
+			.getappinformUserlist()
+			.then(res => {
+				if (res.data.code === 200) {
+					this.listData = res.data.rows;
+				}
+			})
+			.finally(() => {
+				uni.stopPullDownRefresh();
+			});
 	},
 	onLoad(option) {},
 	onShow() {

+ 564 - 173
pages2/verify/input.vue

@@ -1,139 +1,521 @@
 <template>
 	<view style="padding: 30rpx;">
 		<view class="topBox">
-			<view >
+			<view>
 				<u-icon name="error-circle-fill" color="#FF3B30" size="28"></u-icon>
-				<text style="color: #FF3B30;margin-left: 10rpx;">学习前请提交完整审核资料</text></view>
+				<text style="color: #FF3B30;margin-left: 10rpx;">学习前请提交完整审核资料</text>
+			</view>
 
 			<view style="color: #007AFF;">稍后再填</view>
 		</view>
 		<view class="bodyBox" style="margin-top: 30rpx;padding:0 20rpx;">
 			<u-form :model="form" ref="uForm">
-				<u-form-item label="姓名" :required="true" :label-width="auto"><u-input v-model="form.schoolName" /></u-form-item>
-				<u-form-item label="性别" :required="true" prop="sex">
-					<picker @change="bindPickerChangeSex" :value="form.sex" :range="array_sex">
-						<view class="picker">{{ array_sex[form.sex] }}</view>
-					</picker>
-				</u-form-item>
-				<u-form-item label="身份证号" :required="true" prop="idCard" :label-width="auto"><u-input placeholder="请输入身份证号"  v-model="form.idCard" /></u-form-item>
-				<u-form-item label="手机号码" :required="true" prop="telphone" :label-width="auto"><u-input :disabled="true" v-model="form.telphone" /></u-form-item>
-				<u-form-item label="学历" :required="true">
-					<picker @change="bindPickerChangeLevel"  :value="index_level" :range="dictObj['edu_level']">
-								  <view class="picker">
-									{{index_level?dictObj['edu_level'][index_level]:'未知'}}
-								  </view>
+				<template v-for="(item, index) in listData">
+					<u-form-item
+						:key="index"
+						v-if="item.inputType == 1"
+						:label="item.fieldName"
+						:required="item.required"
+						:label-width="auto"
+						:prop="item.required ? item.fieldKey : ''"
+					>
+						<u-input v-model="form[item.fieldKey]" :placeholder="`请输入${item.fieldName}`" />
+					</u-form-item>
+					<u-form-item
+						:key="index"
+						v-if="item.inputType == 2"
+						:label="item.fieldName"
+						:label-width="auto"
+						:required="item.required"
+						:prop="item.required ? item.fieldKey : ''"
+					>
+						<picker @change="bindPickerChange(item.fieldKey, $event)" :value="form[item.fieldKey]" :range="getarrays(item.fieldKey)">
+							<view class="picker">{{ returnName(item.fieldKey) }}</view>
 						</picker>
-				</u-form-item>
-			 <u-form-item label="工作单位" :required="true" :label-width="auto"><u-input v-model="form.schoolName" /></u-form-item>
-			 <u-form-item label="报名岗位" :required="true" :label-width="auto"><u-input v-model="form.schoolName" /></u-form-item>
-			 <u-form-item label="所学专业" :required="true" :label-width="auto"><u-input v-model="form.schoolName" /></u-form-item>
-			 <u-form-item label="工作年限" :required="true" :label-width="auto"><u-input v-model="form.schoolName" /></u-form-item>
-			<u-form-item label="个人近照" :required="true" :label-width="auto" label-position="top">
-				<text style="color: #999999;position: absolute;top: 20rpx;left: 130rpx;">竖向证件照 文件大小≤2M</text>
-				<u-upload @on-list-change="changePhotoListHeader" :auto-upload="false" custom-btn="true" :action="action" :file-list="fileList" width="120" height ="120" size-type="['compressed']" max-count="1">
-					<template v-slot:addBtn >
-						<image src="/static/info_1.png" style="width: 120rpx; height: 169rpx;"></image>
-					</template>  
-				</u-upload> 
-			</u-form-item>
-			<u-form-item label="身份证人像面" :required="true" :label-width="auto" label-position="top">
-				<text style="color: #999999;position: absolute;top: 20rpx;left: 180rpx;">文件大小≤2M</text>
-				<u-upload
-					:auto-upload="false"
-					custom-btn="true"
-					:action="action"
-					:file-list="fileList1"
-					width="120"
-					height="82"
-					size-type="['compressed']"
-					max-count="1"
-					@on-list-change="changePhotoListZ"
-				>
-					<template v-slot:addBtn>
-						<image src="/static/info_2.png" style="width: 120rpx; height: 82rpx;"></image>
-					</template>
-				</u-upload>
-			</u-form-item>
-			<u-form-item label="身份证国徽面" :required="true" :label-width="auto" label-position="top">
-				<text style="color: #999999;position: absolute;top: 20rpx;left: 180rpx;">文件大小≤2M</text>
-				<u-upload
-					:auto-upload="false"
-					custom-btn="true"
-					:action="action"
-					:file-list="fileList2"
-					width="120"
-					height="82"
-					size-type="['compressed']"
-					max-count="1"
-					@on-list-change="changePhotoListF"
-				>
-					<template v-slot:addBtn>
-						<image src="/static/info_3.png" style="width: 120rpx; height: 82rpx;"></image>
-					</template>
-				</u-upload>
-			</u-form-item>
-			<u-form-item label="承诺书" :required="true" :label-width="auto" label-position="top">
-					<view style="line-height: 40rpx;text-indent:2em">
-						<text>
-							 本人自愿做出如下承诺:本人己仔细阅读《广东省住房和城乡建设厅关于推进住房和城乡建设领域施工现场专业人员职业培训工作的通知》 全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
-							  
+					</u-form-item>
+					<u-form-item
+						:key="index"
+						v-if="item.inputType == 5"
+						:label="item.fieldName"
+						:label-width="auto"
+						:required="item.required"
+						:prop="item.required ? item.fieldKey : ''"
+					>
+						<picker mode="date" :value="form[item.fieldKey]" @change="bindDateChange(item.fieldKey, $event)">
+							<view class="picker">{{ getTimes(item.fieldKey) }}</view>
+						</picker>
+					</u-form-item>
+					<u-form-item
+						:key="index"
+						v-if="item.inputType == 3 && item.fieldKey !== 'commitment_electr_signature'"
+						:label="item.fieldName"
+						:required="item.required"
+						:label-width="auto"
+						label-position="top"
+						:prop="item.required ? item.fieldKey : ''"
+					>
+						<text v-if="item.fieldKey === 'recent_photos'" style="color: #999999;position: absolute;top: 20rpx;left: 130rpx;">竖向证件照 文件大小≤2M</text>
+						<text
+							v-if="item.fieldKey === 'idcard_face_photo' || item.fieldKey === 'idcard_national_photo'"
+							style="color: #999999;position: absolute;top: 20rpx;left: 180rpx;"
+						>
+							文件大小≤2M
 						</text>
-						<view style="line-height: 40rpx;text-indent:2em">
-							<text>特此承诺!</text>
-						</view>
+						<u-upload
+							:max-size="2097152"
+							@on-list-change="
+								item.fieldKey === 'recent_photos'
+									? changePhotoListHeader1($event)
+									: item.fieldKey === 'idcard_face_photo'
+									? changePhotoListHeader2($event)
+									: item.fieldKey === 'idcard_national_photo'
+									? changePhotoListHeader3($event)
+									: ''
+							"
+							:auto-upload="false"
+							custom-btn="true"
+							:action="action"
+							:file-list="
+								item.fieldKey === 'recent_photos'
+									? fileList1
+									: item.fieldKey === 'idcard_face_photo'
+									? fileList2
+									: item.fieldKey === 'idcard_national_photo'
+									? fileList3
+									: ''
+							"
+							width="120"
+							height="120"
+							size-type="['compressed']"
+							max-count="1"
+						>
+							<template v-slot:addBtn>
+								<image
+									:src="
+										item.fieldKey === 'recent_photos'
+											? '/static/info_1.png'
+											: item.fieldKey === 'idcard_face_photo'
+											? '/static/info_2.png'
+											: item.fieldKey === 'idcard_national_photo'
+											? '/static/info_3.png'
+											: ''
+									"
+									:style="
+										item.fieldKey === 'recent_photos'
+											? 'width: 120rpx; height: 169rpx;'
+											: item.fieldKey === 'idcard_face_photo'
+											? 'width: 120rpx; height: 82rpx;'
+											: item.fieldKey === 'idcard_national_photo'
+											? 'width: 120rpx; height: 82rpx;'
+											: ''
+									"
+								></image>
+							</template>
+						</u-upload>
+					</u-form-item>
+					<view :key="index" v-if="item.inputType == 3 && item.fieldKey === 'commitment_electr_signature'">
+						<u-form-item
+							v-if="item.inputType == 3 && item.fieldKey === 'commitment_electr_signature'"
+							label="承诺书"
+							:required="true"
+							:label-width="auto"
+							label-position="top"
+						>
+							<view style="line-height: 40rpx;text-indent:2em">
+								<text>
+									本人自愿做出如下承诺:本人己仔细阅读《广东省住房和城乡建设厅关于推进住房和城乡建设领域施工现场专业人员职业培训工作的通知》
+									全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
+								</text>
+								<view style="line-height: 40rpx;text-indent:2em"><text>特此承诺!</text></view>
+							</view>
+						</u-form-item>
+						<u-form-item
+							v-if="item.inputType == 3 && item.fieldKey === 'commitment_electr_signature'"
+							label="签名板"
+							:required="true"
+							:label-width="auto"
+							label-position="top"
+							:prop="item.required ? item.fieldKey : ''"
+						>
+							<view class="dis_stys">
+								<text style="color: #999999;">请在下方签名区进行签名</text>
+								<text @click="retDraw" mode="">清空</text>
+							</view>
+							<view class="handCenter">
+								<canvas
+									class="handWriting"
+									disable-scroll="true"
+									@touchstart="uploadScaleStart"
+									@touchmove="uploadScaleMove"
+									@touchend="uploadScaleEnd"
+									@tap="mouseDown"
+									canvas-id="handWriting"
+								></canvas>
+							</view>
+						</u-form-item>
 					</view>
-			</u-form-item>
-			<u-form-item label="签名板" :required="true" :label-width="auto" label-position="top">
-				<text style="color: #999999;position: absolute;top: 20rpx;left: 100rpx;">请在下方签名区进行签名</text>
-				<view class="headerSDels">
-					<text @click="retDraw" style="width: 80rpx;height: 50rpx;" mode="">清空</text>
-				</view>
-				<view class="handCenter">
-					<canvas
-						class="handWriting"
-						disable-scroll="true"
-						@touchstart="uploadScaleStart"
-						@touchmove="uploadScaleMove"
-						@touchend="uploadScaleEnd"
-						@tap="mouseDown"
-						canvas-id="handWriting"
-					></canvas>
-				</view>
-			</u-form-item>
+				</template>
 			</u-form>
 		</view>
-		<view @click="resultForm" class="submit_btn">提交资料</view>
+		<view @click="submits" class="submit_btn">{{ nextStatus ? '下一步' : '提交资料' }}</view>
 	</view>
 </template>
 
 <script>
-	import Handwriting from '@/common/signature.js';
+import { mapGetters } from 'vuex';
+import Handwriting from '@/common/signature.js';
 export default {
 	data() {
 		return {
-			form:{
-				sex: 0,
+			form: {
+				name: '',
+				sex: '',
+				idcard: '',
+				telphone: '',
+				education: '',
+				school: '',
+				graduation_time: '',
+				work_unit: '',
+				unit_contact: '',
+				unit_tel: '',
+				apply_post: '',
+				major: '',
+				working_years: '',
+				recent_photos: '',
+				idcard_face_photo: '',
+				idcard_national_photo: '',
+				commitment_electr_signature: ''
 			},
 			array_sex: ['男', '女'],
 			pageInfo: {},
 			lineColor: 'black',
 			slideValue: 50,
-			handwriting: ''
+			handwriting: '',
+			goodsId: null,
+			listData: {}, //页面数据
+			fileList1: [], //个人近照
+			fileList2: [], //人像
+			fileList3: [], //国徽
+			openVerify: false, // 控制是否手动验证
+			nextStatus: false, //是否有下一步
+			rules: {
+				name: [
+					{
+						required: true,
+						message: '请输入姓名',
+						trigger: ['change', 'blur']
+					}
+				],
+				sex: [
+					{
+						required: true,
+						message: '请选择性别',
+						trigger: 'change'
+					}
+				],
+				idcard: [
+					{
+						required: true,
+						message: '请输入身份证号',
+						trigger: ['change', 'blur']
+					},
+					{
+						validator: (rule, value, callback) => {
+							return this.$u.test.idCard(value);
+						},
+						message: '身份证号不正确',
+						trigger: ['change', 'blur']
+					}
+				],
+				telphone: [
+					{
+						required: true,
+						message: '请输入手机号码',
+						trigger: ['change', 'blur']
+					},
+					{
+						validator: (rule, value, callback) => {
+							return this.$u.test.mobile(value);
+						},
+						message: '手机号码不正确',
+						trigger: ['change', 'blur']
+					}
+				],
+				education: [
+					{
+						required: true,
+						message: '请选择学历',
+						trigger: 'change'
+					}
+				],
+				school: [
+					{
+						required: true,
+						message: '请输入毕业院校',
+						trigger: ['change', 'blur']
+					}
+				],
+				graduation_time: [
+					{
+						required: true,
+						message: '请选择毕业时间',
+						trigger: 'change'
+					}
+				],
+				work_unit: [
+					{
+						required: true,
+						message: '请输入工作单位',
+						trigger: ['change', 'blur']
+					}
+				],
+				unit_contact: [
+					{
+						required: true,
+						message: '请输入单位联系人',
+						trigger: ['change', 'blur']
+					}
+				],
+				unit_tel: [
+					{
+						required: true,
+						message: '请输入单位联系电话',
+						trigger: ['change', 'blur']
+					},
+					{
+						validator: (rule, value, callback) => {
+							return this.$u.test.mobile(value);
+						},
+						message: '单位联系电话不正确',
+						trigger: ['change', 'blur']
+					}
+				],
+				apply_post: [
+					{
+						required: true,
+						message: '请输入报名岗位',
+						trigger: ['change', 'blur']
+					}
+				],
+				major: [
+					{
+						required: true,
+						message: '请输入所学专业',
+						trigger: ['change', 'blur']
+					}
+				],
+				working_years: [
+					{
+						required: true,
+						message: '请选择工作年限',
+						trigger: 'change'
+					}
+				],
+				recent_photos: [
+					{
+						required: true,
+						message: '请上传个人近照',
+						trigger: ['change', 'blur']
+					}
+				],
+				idcard_face_photo: [
+					{
+						required: true,
+						message: '请上传身份证正面照',
+						trigger: ['change', 'blur']
+					}
+				],
+				idcard_national_photo: [
+					{
+						required: true,
+						message: '请上传身份证国徽照',
+						trigger: ['change', 'blur']
+					}
+				],
+				commitment_electr_signature: [
+					{
+						required: true,
+						message: '请签写承诺书电子签',
+						trigger: ['change', 'blur']
+					}
+				]
+			}
 		};
 	},
+	created() {},
+	onLoad(option) {
+		this.goodsId = Number(option.id);
+		this.getInfo();
+	},
 	onReady(res) {
 		this.handwriting = new Handwriting({
 			lineColor: this.lineColor,
 			slideValue: this.slideValue, // 0, 25, 50, 75, 100
 			canvasName: 'handWriting'
 		});
+		this.$refs.uForm.setRules(this.rules);
 	},
+	computed: { ...mapGetters(['dictObj']) },
 	methods: {
-		bindPickerChangeSex(e) {
-			this.form.sex = e.detail.value;
+		//提交表单
+		async submitApi() {
+			var data = JSON.parse(JSON.stringify(this.form));
+			if (data['sex']) {
+				data.sex = this.dictObj['sys_user_sex'][Number(data.sex)];
+			}
+			if (data['education']) {
+				data.education = this.dictObj['edu_level'][Number(data.education)];
+			}
+			if (data['working_years']) {
+				data.working_years = this.dictObj['working_years'][Number(data.working_years)];
+			}
+			if (data['recent_photos']) {
+				data.recent_photos = await this.$method.uploadFile(data.recent_photos, 0);
+			}
+			if (data['idcard_face_photo']) {
+				data.idcard_face_photo = await this.$method.uploadFile(data.idcard_face_photo, 0);
+			}
+			if (data['idcard_national_photo']) {
+				data.idcard_national_photo = await this.$method.uploadFile(data.idcard_national_photo, 0);
+			}
+			if (data['commitment_electr_signature']) {
+				data.commitment_electr_signature = await this.$method.uploadFile(data.commitment_electr_signature, 0);
+			}
+			if (this.nextStatus) {
+				this.$store.commit('updataCopyData', data);
+				this.$navTo.togo('/pages2/verify/input2', {
+					id: this.goodsId
+				});
+			} else {
+				console.log(data);
+			}
+		},
+		//验证表单
+		resultForm(int) {
+			if (this.openVerify) {
+				this.$refs.uForm.validate(valid => {
+					if (valid) {
+						if (int === 1) {
+							this.submitApi();
+						}
+					} else {
+						console.log('验证失败');
+					}
+				});
+			}
+		},
+		async submits() {
+			await this.subCanvas();
+			this.openVerify = true;
+			this.resultForm(1);
+		},
+		async changePhotoListHeader1(lists, name) {
+			if (lists.length) {
+				this.fileList1 = lists;
+				this.form.recent_photos = await this.$method.imageInfos(lists[0].url);
+			} else {
+				this.fileList1 = [];
+				this.$set(this.form, 'recent_photos', '');
+			}
+			this.$nextTick(function() {
+				this.resultForm();
+			});
+		},
+		async changePhotoListHeader2(lists, name) {
+			if (lists.length) {
+				this.fileList2 = lists;
+				this.form.idcard_face_photo = await this.$method.imageInfos(lists[0].url);
+			} else {
+				this.fileList2 = [];
+				this.$set(this.form, 'idcard_face_photo', '');
+			}
+			this.$nextTick(function() {
+				this.resultForm();
+			});
+		},
+		async changePhotoListHeader3(lists, name) {
+			if (lists.length) {
+				this.fileList3 = lists;
+				this.form.idcard_national_photo = await this.$method.imageInfos(lists[0].url);
+			} else {
+				this.fileList3 = [];
+				this.$set(this.form, 'idcard_national_photo', '');
+			}
+			this.$nextTick(function() {
+				this.resultForm();
+			});
+		},
+		getTimes(key) {
+			if (this.form[key]) {
+				return this.form[key];
+			} else {
+				return '请选择时间';
+			}
+		},
+		getarrays(key) {
+			if (key === 'sex') {
+				return this.dictObj['sys_user_sex'];
+			}
+			if (key === 'education') {
+				return this.dictObj['edu_level'];
+			}
+			if (key === 'working_years') {
+				return this.dictObj['working_years'];
+			}
+		},
+		returnName(key) {
+			if (key === 'sex') {
+				if (this.form[key]) {
+					return this.dictObj['sys_user_sex'][Number(this.form[key])];
+				} else {
+					return '请选择性别';
+				}
+			}
+			if (key === 'education') {
+				if (this.form[key]) {
+					return this.dictObj['edu_level'][Number(this.form[key])];
+				} else {
+					return '请选择学历';
+				}
+			}
+			if (key === 'working_years') {
+				if (this.form[key]) {
+					return this.dictObj['working_years'][Number(this.form[key])];
+				} else {
+					return '请选择工作年限';
+				}
+			}
+		},
+		getInfo() {
+			this.$api.getbaseprofiletpId(this.goodsId).then(res => {
+				var ast = JSON.parse(res.data.data.keyValue);
+				const key2 = JSON.parse(res.data.data.keyValue2);
+				if (key2.length) {
+					this.nextStatus = true;
+				}
+				ast.forEach(item => {
+					if (item.fieldKey === 'school' || item.fieldKey === 'major') {
+						item.inputType = 1;
+					}
+				});
+				this.listData = ast;
+			});
+		},
+		bindPickerChange(key, e) {
+			this.$set(this.form, key, e.detail.value);
+			this.$nextTick(function() {
+				this.resultForm();
+			});
+		},
+		bindDateChange(key, e) {
+			this.form[key] = e.detail.value;
 		},
 		retDraw() {
 			this.handwriting.retDraw();
+			this.$set(this.form, 'commitment_electr_signature', '');
+			this.$nextTick(function() {
+				this.resultForm();
+			});
 		},
 		uploadScaleStart(event) {
 			this.handwriting.uploadScaleStart(event);
@@ -145,87 +527,96 @@ export default {
 			this.handwriting.uploadScaleEnd(event);
 		},
 		subCanvas() {
-			var self = this;
-			self.handwriting
-				.saveCanvas()
-				.then(res => {
-					console.log(res);
-				})
-				.catch(err => {
-					uni.showToast({
-						title: '签名上传失败',
-						icon: 'error'
+			return new Promise((resolve, reject) => {
+				var self = this;
+				self.handwriting
+					.saveCanvas()
+					.then(res => {
+						if (this.handwriting.linePrack.length) {
+							this.$set(this.form, 'commitment_electr_signature', res);
+						}
+						resolve(res);
+					})
+					.catch(err => {
+						uni.showToast({
+							title: '签名上传失败',
+							icon: 'error'
+						});
 					});
-				});
+			});
 		}
 	}
 };
 </script>
-<style >
-	page {
-			background: #EAEEF1;
-		}
+<style>
+page {
+	background: #eaeef1;
+}
 </style>
 <style scope>
-	.handCenter{
-		background: #F7F7F7;
-		border: 2rpx solid #EEEEEE;
-		border-radius: 24rpx;
-	}
-	.headerSDels {
-		height: 58rpx;
-		padding: 0rpx 24rpx;
-		font-weight: bold;
-		display: flex;
-		align-items: center;
-		flex-direction: row-reverse;
-	}
-	.listBox {
-		margin: 24rpx 32rpx 0rpx;
-		box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
-		border-radius: 32rpx;
-		background-color: #fff;
-		overflow: hidden;
-	}
-	.imgBoxs {
-		width: 156rpx;
-		height: 203rpx;
-	}
-	.imgBoxs2 {
-		width: 171rpx;
-		height: 108rpx;
-	}
-	.submit_btn {
-		width: 526rpx;
-		height: 80rpx;
-		background: #007AFF;
-		border-radius: 40rpx;
-		text-align: center;
-		line-height: 80rpx;
-		color: #FFFFFF;
-		margin: 30rpx auto;
-	}
-	.picker {
-		text-align: right;
-	}
-	input{
-		text-align: right;
-	}
-	.bodyBox{
-		background: #FFFFFF;
-		border-radius: 24rpx;
-		width: 100%;
-	}
-	.topBox{
-		height: 80rpx;
-		background: #FFFFFF;
-		border-radius: 24rpx;
-		width: 100%;
-		display: flex;
-		justify-content: space-between;
-		line-height: 80rpx;
-		padding: 0 20rpx;
-		font-size: 24rpx;
-	}
-
+.dis_stys {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+}
+.handCenter {
+	background: #f7f7f7;
+	border: 2rpx solid #eeeeee;
+	border-radius: 24rpx;
+}
+.headerSDels {
+	height: 58rpx;
+	padding: 0rpx 24rpx;
+	font-weight: bold;
+	display: flex;
+	align-items: center;
+	flex-direction: row-reverse;
+}
+.listBox {
+	margin: 24rpx 32rpx 0rpx;
+	box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
+	border-radius: 32rpx;
+	background-color: #fff;
+	overflow: hidden;
+}
+.imgBoxs {
+	width: 156rpx;
+	height: 203rpx;
+}
+.imgBoxs2 {
+	width: 171rpx;
+	height: 108rpx;
+}
+.submit_btn {
+	width: 526rpx;
+	height: 80rpx;
+	background: #007aff;
+	border-radius: 40rpx;
+	text-align: center;
+	line-height: 80rpx;
+	color: #ffffff;
+	margin: 30rpx auto;
+}
+.picker {
+	text-align: right;
+}
+input {
+	text-align: right;
+}
+.bodyBox {
+	background: #ffffff;
+	border-radius: 24rpx;
+	width: 100%;
+}
+.topBox {
+	height: 80rpx;
+	background: #ffffff;
+	border-radius: 24rpx;
+	width: 100%;
+	display: flex;
+	justify-content: space-between;
+	line-height: 80rpx;
+	padding: 0 20rpx;
+	font-size: 24rpx;
+}
 </style>

+ 241 - 0
pages2/verify/input2.vue

@@ -0,0 +1,241 @@
+<template>
+	<view style="padding: 30rpx;">
+		<view class="topBox">
+			<view>
+				<u-icon name="error-circle-fill" color="#FF3B30" size="28"></u-icon>
+				<text style="color: #FF3B30;margin-left: 10rpx;">学习前请提交完整审核资料</text>
+			</view>
+
+			<view style="color: #007AFF;">稍后再填</view>
+		</view>
+		<view class="bodyBox" style="margin-top: 30rpx;padding:0 20rpx;">
+			<u-form :model="form" ref="uForm">
+				<template v-for="(item, index) in listData">
+					<u-form-item
+						v-if="item.inputType == 4"
+						:key="index"
+						:label="item.fieldName"
+						:required="item.required"
+						:label-width="auto"
+						:prop="item.required ? item.fieldKey : ''"
+						label-position="top"
+					>
+						<text style="color: blue;position: absolute;top: 20rpx;left: 180rpx;text-decoration: underline;" @click="downDocx(item.url)">点击下载</text>
+						<view class="dis_stys"><text style="color: #999999;">下载承诺书进行填写并签名盖章后上传(≤2M)</text></view>
+						<view style="width: 169rpx; height: 169rpx;position: relative;">
+							<image v-if="!form[item.fieldKey]" style="width: 100%; height: 100%;" @click="uploadFieds" src="@/static/info_4.png"></image>
+							<image v-if="form[item.fieldKey]" src="@/static/icon/jy_icon.png" style="width: 100%; height: 100%;"></image>
+							<u-icon v-if="form[item.fieldKey]" name="close-circle-fill" color="red" size="44" class="optionsAbs" @click="clearWord"></u-icon>
+						</view>
+					</u-form-item>
+				</template>
+			</u-form>
+		</view>
+		<!-- <view style="width: 169rpx; height: 169rpx;position: relative;">
+			<image v-if="!form.commitment_seal" style="width: 100%; height: 100%;" @click="uploadFieds" src="@/static/info_4.png"></image>
+			<image v-if="form.commitment_seal" src="@/static/icon/jy_icon.png" style="width: 100%; height: 100%;"></image>
+			<u-icon v-if="form.commitment_seal" name="close-circle-fill" color="red" size="44" class="optionsAbs" @click="clearWord"></u-icon>
+		</view> -->
+		<view @click="submits" class="submit_btn">提交资料</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			form: {
+				commitment_seal: ''
+			},
+			goodsId: null,
+			fileList1: [],
+			listData: {}, //页面数据
+			openVerify: false, // 控制是否手动验证
+			nextStatus: false, //是否有下一步
+			copyData: null,
+			rules: {
+				commitment_seal: [
+					{
+						required: true,
+						message: '请上传承诺书盖章',
+						trigger: ['change', 'blur']
+					}
+				]
+			}
+		};
+	},
+	created() {},
+	onLoad(option) {
+		this.goodsId = Number(option.id);
+		this.getInfo();
+	},
+	onReady() {
+		this.$refs.uForm.setRules(this.rules);
+	},
+	methods: {
+		downDocx(url){
+			uni.downloadFile({
+			    url: this.$method.splitImgHost(url), 
+			    success: (res) => {
+			        if (res.statusCode === 200) {
+						console.log(this.$method.splitImgHost(url))
+						this.$method.showToast("下载成功")
+			        }
+			    }
+			});
+		},
+		clearWord() {
+			this.$set(this.form, 'commitment_seal', '');
+		},
+		uploadFieds() {
+			var self = this
+			wx.chooseMessageFile({
+				count: 1,
+				size: 2097152,
+				type: 'file',
+				success(res) {
+					if (res.tempFiles[0].size > 2097152) {
+						self.$method.showToast('上传文件不得大于2M');
+						return;
+					} else {
+						self.$set(self.form, 'commitment_seal', res.tempFiles[0].path);
+						self.$nextTick(function() {
+							this.resultForm();
+						});
+					}
+				}
+			});
+		},
+		//提交表单
+		async submitApi() {
+			var data = JSON.parse(JSON.stringify(this.form));
+			if (data['commitment_seal']) {
+				data.commitment_seal = await this.$method.uploadFile(data.commitment_seal, 0);
+			}
+			var concatData = {}
+			Object.assign(concatData,this.copyData,data)
+			console.log(concatData);
+		},
+		//验证表单
+		resultForm(int) {
+			if (this.openVerify) {
+				this.$refs.uForm.validate(valid => {
+					if (valid) {
+						if (int === 1) {
+							this.submitApi();
+						}
+					} else {
+						console.log('验证失败');
+					}
+				});
+			}
+		},
+		submits() {
+			this.openVerify = true;
+			this.resultForm(1);
+		},
+		async changePhotoListHeader1(lists, name) {
+			if (lists.length) {
+				this.fileList1 = lists;
+				this.form.commitment_seal = await this.$method.imageInfos(lists[0].url);
+			} else {
+				this.fileList1 = [];
+				this.$set(this.form, 'commitment_seal', '');
+			}
+			this.$nextTick(function() {
+				this.resultForm();
+			});
+		},
+
+		getInfo() {
+			// this.copyData = this.$store.getters.getCopyData
+			this.copyData = {
+				name: '唐立安',
+				sex: '男'
+			};
+			this.$api.getbaseprofiletpId(this.goodsId).then(res => {
+				var ast = JSON.parse(res.data.data.keyValue2);
+				this.listData = ast;
+			});
+		}
+	}
+};
+</script>
+<style>
+page {
+	background: #eaeef1;
+}
+</style>
+<style scope>
+.optionsAbs {
+	position: absolute;
+	z-index: 99;
+	top: 10rpx;
+	right: 10rpx;
+}
+.dis_stys {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+}
+.handCenter {
+	background: #f7f7f7;
+	border: 2rpx solid #eeeeee;
+	border-radius: 24rpx;
+}
+.headerSDels {
+	height: 58rpx;
+	padding: 0rpx 24rpx;
+	font-weight: bold;
+	display: flex;
+	align-items: center;
+	flex-direction: row-reverse;
+}
+.listBox {
+	margin: 24rpx 32rpx 0rpx;
+	box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
+	border-radius: 32rpx;
+	background-color: #fff;
+	overflow: hidden;
+}
+.imgBoxs {
+	width: 156rpx;
+	height: 203rpx;
+}
+.imgBoxs2 {
+	width: 171rpx;
+	height: 108rpx;
+}
+.submit_btn {
+	width: 526rpx;
+	height: 80rpx;
+	background: #007aff;
+	border-radius: 40rpx;
+	text-align: center;
+	line-height: 80rpx;
+	color: #ffffff;
+	margin: 30rpx auto;
+}
+.picker {
+	text-align: right;
+}
+input {
+	text-align: right;
+}
+.bodyBox {
+	background: #ffffff;
+	border-radius: 24rpx;
+	width: 100%;
+}
+.topBox {
+	height: 80rpx;
+	background: #ffffff;
+	border-radius: 24rpx;
+	width: 100%;
+	display: flex;
+	justify-content: space-between;
+	line-height: 80rpx;
+	padding: 0 20rpx;
+	font-size: 24rpx;
+}
+</style>

BIN
static/courseIcon.png


BIN
static/examIcon.png


+ 24 - 2
store/index.js

@@ -14,7 +14,8 @@ const store = new Vuex.Store({
 		goodsAuditionConfigIdList: [], //当前访问页面的试听节ID
 		shoppingCartList: [], //购物车支付商品
 		applyData: {}, //预约考试数据存放
-		playSectionId: 0
+		playSectionId: 0,
+		copyData: null, //存放审核资料数据
 	},
 	getters: {
 		userInfo: state => {
@@ -26,6 +27,23 @@ const store = new Vuex.Store({
 			return state.userInfo
 		},
 		dictObj: state => {
+			if (state.dictObj == null) {
+				api.dictList().then(res => {
+					if (res.data.code === 200) {
+						let newList = {}
+						let list = res.data.data
+						for (let i = 0; i < list.length; i++) {
+							let item = list[i]
+							if (newList.hasOwnProperty(item.dictType)) {
+								newList[item.dictType].push(item.dictLabel)
+							} else {
+								newList[item.dictType] = [item.dictLabel]
+							}
+						}
+						state.dictObj = newList;
+					}
+				});
+			}
 			return state.dictObj
 		},
 		allowLoading: state => {
@@ -42,9 +60,13 @@ const store = new Vuex.Store({
 		},
 		playSectionId: state => {
 			return state.playSectionId
-		}
+		},
+		getCopyData: state => state.copyData
 	},
 	mutations: {
+		updataCopyData(state, objs) {
+			state.copyData = objs
+		},
 		updateApplyData(state, arrays) {
 			state.applyData = arrays;
 		},