Tang пре 4 година
родитељ
комит
0e2a574356
6 измењених фајлова са 72 додато и 34 уклоњено
  1. 1 1
      components/home.vue
  2. 2 1
      components/my.vue
  3. 1 1
      pages.json
  4. 6 2
      pages2/recruitment/detailsInfo.vue
  5. 57 25
      pages2/resume/addResume.vue
  6. 5 4
      pages2/wd/info.vue

+ 1 - 1
components/home.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<view>
 	<view>
 		<view style="z-index: 999;">
 		<view style="z-index: 999;">
-			<u-navbar title="中正云学堂" :is-back="false">
+			<u-navbar title="中正砼学联" :is-back="false">
 				<view class="slot-wrap"><image src="/static/search.png" class="search" @click="jumpSearch"></image></view>
 				<view class="slot-wrap"><image src="/static/search.png" class="search" @click="jumpSearch"></image></view>
 			</u-navbar>
 			</u-navbar>
 		</view>
 		</view>

+ 2 - 1
components/my.vue

@@ -223,12 +223,13 @@ export default {
 				id: item.courseId
 				id: item.courseId
 			});
 			});
 			return;
 			return;
-		},
+		},  
 		async init() {
 		async init() {
 			this.$store.state.allowLoading = false;
 			this.$store.state.allowLoading = false;
 			const firstFunc = await this.getInfoAttached();
 			const firstFunc = await this.getInfoAttached();
 			const seciedFunc = await this.getLevel();
 			const seciedFunc = await this.getLevel();
 			this.$store.state.allowLoading = true;
 			this.$store.state.allowLoading = true;
+
 		},
 		},
 		jumpPopup() {
 		jumpPopup() {
 			uni.showModal({
 			uni.showModal({

+ 1 - 1
pages.json

@@ -3,7 +3,7 @@
 		{
 		{
 			"path": "pages/index/index",
 			"path": "pages/index/index",
 			"style": {
 			"style": {
-				"navigationBarTitleText": "中正云学堂",
+				"navigationBarTitleText": "中正砼学联",
 				"onReachBottomDistance": 50,
 				"onReachBottomDistance": 50,
 				"app-plus": {
 				"app-plus": {
 					"titleNView": false //禁用原生导航栏  
 					"titleNView": false //禁用原生导航栏  

+ 6 - 2
pages2/recruitment/detailsInfo.vue

@@ -179,8 +179,12 @@ export default {
 				title:'加载中'
 				title:'加载中'
 			})
 			})
 			this.$api.recruitneedsId(v).then(res => {
 			this.$api.recruitneedsId(v).then(res => {
-				res.data.data.bonusCertificate = res.data.data.bonusCertificate.split(',');
-				res.data.data.welfare = res.data.data.welfare.split(',');
+				if(res.data.data.bonusCertificate !== null){
+					res.data.data.bonusCertificate = res.data.data.bonusCertificate.split(',');
+				}
+				if(res.data.data.welfare !== null){
+					res.data.data.welfare = res.data.data.welfare.split(',');
+				}
 				this.GyArray = res.data.data;
 				this.GyArray = res.data.data;
 				uni.hideLoading()
 				uni.hideLoading()
 			});
 			});

+ 57 - 25
pages2/resume/addResume.vue

@@ -3,12 +3,14 @@
 		<!-- <view class="jdtSty" :style="'width:' + formTableInfos.completeness + '%'"></view> -->
 		<!-- <view class="jdtSty" :style="'width:' + formTableInfos.completeness + '%'"></view> -->
 		<u-navbar back-icon-name="arrow-left" style="position: relative;">
 		<u-navbar back-icon-name="arrow-left" style="position: relative;">
 			<view style="justify-content: center;margin-left: 85rpx;flex: 1;">
 			<view style="justify-content: center;margin-left: 85rpx;flex: 1;">
-				<view style="color: #0c141f;font-size: 32rpx;font-weight: bold;text-align: center;">{{id !== null ? '修改简历':'新建简历'}}</view>
-				<view style="font-size: 18rpx;color: #666;text-align: center;" v-if="formTableInfos.completeness">简历完成度{{formTableInfos.completeness}}%</view>
-			</view>
-			<view v-if="formTableInfos.completeness" style="height: 2rpx;background-color: #3FEFB7;position: absolute;bottom: -2rpx;left: 0;" :style="'width:' + formTableInfos.completeness + 'vw'">
-				
+				<view style="color: #0c141f;font-size: 32rpx;font-weight: bold;text-align: center;">{{ id !== null ? '修改简历' : '新建简历' }}</view>
+				<view style="font-size: 18rpx;color: #666;text-align: center;" v-if="formTableInfos.completeness">简历完成度{{ formTableInfos.completeness }}%</view>
 			</view>
 			</view>
+			<view
+				v-if="formTableInfos.completeness"
+				style="height: 2rpx;background-color: #3FEFB7;position: absolute;bottom: -2rpx;left: 0;"
+				:style="'width:' + formTableInfos.completeness + 'vw'"
+			></view>
 		</u-navbar>
 		</u-navbar>
 		<view class="pad_59">
 		<view class="pad_59">
 			<view class="lisbox">
 			<view class="lisbox">
@@ -27,11 +29,11 @@
 					</view>
 					</view>
 					<!-- <view class="color_b" style="margin-bottom: 24rpx;">{{ userInfo.realname }}</view> -->
 					<!-- <view class="color_b" style="margin-bottom: 24rpx;">{{ userInfo.realname }}</view> -->
 					<view class="dis_fy" style="margin-bottom: 24rpx;">
 					<view class="dis_fy" style="margin-bottom: 24rpx;">
-						<view class="le_h">{{ userInfo.sex === 0 ? '男' : '女' }}</view>
+						<view class="le_h">{{ formTableInfos.sex === 0 ? '男' : '女' }}</view>
 						<view class="fgs"></view>
 						<view class="fgs"></view>
-						<view class="le_h">{{ getYears(userInfo.userBirth) }}岁</view>
+						<view class="le_h">{{ getYears(formTableInfos.userBirth) }}岁</view>
 						<view class="fgs"></view>
 						<view class="fgs"></view>
-						<view class="le_h">{{ userInfo.houseCity }} - {{ userInfo.houseDistrict }}</view>
+						<view class="le_h">{{ formTableInfos.city }} - {{ formTableInfos.district }}</view>
 					</view>
 					</view>
 					<!-- {{ userInfo.telphone }} -->
 					<!-- {{ userInfo.telphone }} -->
 					<view class="le_h" style="margin-bottom: 24rpx;display: flex;align-items: center;">
 					<view class="le_h" style="margin-bottom: 24rpx;display: flex;align-items: center;">
@@ -467,7 +469,7 @@ export default {
 			array_cfType: ['建筑资历证书', '非建筑资历证书'],
 			array_cfType: ['建筑资历证书', '非建筑资历证书'],
 			userSchool: {},
 			userSchool: {},
 			id: null,
 			id: null,
-			showJDT: false,
+			showJDT: false
 		};
 		};
 	},
 	},
 	onLoad(options) {
 	onLoad(options) {
@@ -476,27 +478,56 @@ export default {
 		if (options.id !== undefined) {
 		if (options.id !== undefined) {
 			this.id = options.id;
 			this.id = options.id;
 			this.init(options.id);
 			this.init(options.id);
+		} else {
+			this.initForm();
 		}
 		}
 	},
 	},
 	// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
 	// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
 	onReady() {
 	onReady() {
 		this.$refs.uForm.setRules(this.rules);
 		this.$refs.uForm.setRules(this.rules);
 	},
 	},
-	computed: { ...mapGetters(['dictObj','userInfo']) },
+	computed: { ...mapGetters(['dictObj', 'userInfo']) },
 	mounted() {
 	mounted() {
 		this.getCateList();
 		this.getCateList();
 	},
 	},
+	watch: {
+		userInfo(val, oldVal) {
+			if (val) {
+				this.initForm();
+			}
+		}
+	},
 	methods: {
 	methods: {
+		initForm() {
+			this.formTableInfos.realname = this.userInfo.realname;
+			this.formTableInfos.sex = this.userInfo.sex;
+			this.formTableInfos.userBirth = this.userInfo.userBirth;
+			this.formTableInfos.city = this.userInfo.houseCity;
+			this.formTableInfos.district = this.userInfo.houseDistrict;
+			// this.formTableInfos.telphone = this.userInfo.telphone;
+			// this.formTableInfos.eduLevel = userInfo.
+			this.formTableInfos.email = this.userInfo.email;
+		},
 		init(v) {
 		init(v) {
 			var self = this;
 			var self = this;
 			this.$api.recruitresumeId(v).then(res => {
 			this.$api.recruitresumeId(v).then(res => {
 				if (res.data.code === 200) {
 				if (res.data.code === 200) {
-					self.showJDT = true
-					res.data.data.certificateJson = JSON.parse(res.data.data.certificateJson);
-					res.data.data.eduExperienceJson = JSON.parse(res.data.data.eduExperienceJson);
-					res.data.data.projectExperienceJson = JSON.parse(res.data.data.projectExperienceJson);
-					res.data.data.workExperienceJson = JSON.parse(res.data.data.workExperienceJson);
-					res.data.data.userBirth = self.getYears(res.data.data.userBirth.slice(0, res.data.data.userBirth.indexOf('T')));
+					self.showJDT = true;
+					if (res.data.data.certificateJson !== null) {
+						res.data.data.certificateJson = JSON.parse(res.data.data.certificateJson);
+					}
+					if (res.data.data.eduExperienceJson !== null) {
+						res.data.data.eduExperienceJson = JSON.parse(res.data.data.eduExperienceJson);
+					}
+					if (res.data.data.projectExperienceJson !== null) {
+						res.data.data.projectExperienceJson = JSON.parse(res.data.data.projectExperienceJson);
+					}
+					if (res.data.data.workExperienceJson !== null) {
+						res.data.data.workExperienceJson = JSON.parse(res.data.data.workExperienceJson);
+					}
+					if (res.data.data.userBirth !== null && res.data.data.userBirth.indexOf('T') !== -1) {
+						res.data.data.userBirth = res.data.data.userBirth.slice(0, res.data.data.userBirth.indexOf('T'));
+					}
 					if (res.data.data.eduLevel) {
 					if (res.data.data.eduLevel) {
 						self.index_level = self.dictObj['edu_level'].indexOf(res.data.data.eduLevel);
 						self.index_level = self.dictObj['edu_level'].indexOf(res.data.data.eduLevel);
 					}
 					}
@@ -511,6 +542,7 @@ export default {
 						res.data.data.startYear = res.data.data.startYear + '年';
 						res.data.data.startYear = res.data.data.startYear + '年';
 					}
 					}
 					this.formTableInfos = res.data.data;
 					this.formTableInfos = res.data.data;
+					console.log(this.formTableInfos);
 				}
 				}
 			});
 			});
 		},
 		},
@@ -985,7 +1017,7 @@ export default {
 				const awaitsMys = await this.$api.addrecruitresume(data);
 				const awaitsMys = await this.$api.addrecruitresume(data);
 				uni.hideLoading();
 				uni.hideLoading();
 				if (awaitsMys.data.code === 200) {
 				if (awaitsMys.data.code === 200) {
-					setTimeout(()=>{
+					setTimeout(() => {
 						uni.showToast({
 						uni.showToast({
 							title: '提交成功',
 							title: '提交成功',
 							icon: 'success',
 							icon: 'success',
@@ -998,7 +1030,7 @@ export default {
 								}, 1000);
 								}, 1000);
 							}
 							}
 						});
 						});
-					},500);
+					}, 500);
 				} else {
 				} else {
 					uni.showToast({
 					uni.showToast({
 						title: '提交失败',
 						title: '提交失败',
@@ -1011,7 +1043,7 @@ export default {
 				const awaitsMys = await this.$api.editrecruitresume(data);
 				const awaitsMys = await this.$api.editrecruitresume(data);
 				uni.hideLoading();
 				uni.hideLoading();
 				if (awaitsMys.data.code === 200) {
 				if (awaitsMys.data.code === 200) {
-					setTimeout(()=>{
+					setTimeout(() => {
 						uni.showToast({
 						uni.showToast({
 							title: '修改成功',
 							title: '修改成功',
 							icon: 'success',
 							icon: 'success',
@@ -1024,8 +1056,7 @@ export default {
 								}, 1000);
 								}, 1000);
 							}
 							}
 						});
 						});
-					},500);
-					
+					}, 500);
 				} else {
 				} else {
 					uni.showToast({
 					uni.showToast({
 						title: '修改失败',
 						title: '修改失败',
@@ -1309,6 +1340,7 @@ export default {
 			this.$navTo.togo('/pages2/wd/info', {});
 			this.$navTo.togo('/pages2/wd/info', {});
 		},
 		},
 		getYears(strBirthday) {
 		getYears(strBirthday) {
+			console.log(strBirthday, 101);
 			if (strBirthday === undefined) {
 			if (strBirthday === undefined) {
 				return '-';
 				return '-';
 			}
 			}
@@ -1353,10 +1385,10 @@ export default {
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>
-	.jdtSty{
-		height: 2rpx;
-		background-color: #3FEFB7;
-	}
+.jdtSty {
+	height: 2rpx;
+	background-color: #3fefb7;
+}
 .pad_59 {
 .pad_59 {
 	padding: 15rpx 28rpx 59rpx 59rpx;
 	padding: 15rpx 28rpx 59rpx 59rpx;
 }
 }

+ 5 - 4
pages2/wd/info.vue

@@ -15,9 +15,9 @@
 		</view>
 		</view>
 		<view class="form">
 		<view class="form">
 			<u-form :model="form" ref="uForm">
 			<u-form :model="form" ref="uForm">
-				<u-form-item label="姓名" prop="realname"><u-input placeholder="请实名认证" :disabled="true" v-model="form.realname" /></u-form-item>
+				<u-form-item label="姓名" prop="realname"><u-input placeholder="请输入真名"  v-model="form.realname" /></u-form-item>
 				<u-form-item label="手机号码" prop="telphone" :label-width="auto"><u-input :disabled="true" v-model="form.telphone" /></u-form-item>
 				<u-form-item label="手机号码" prop="telphone" :label-width="auto"><u-input :disabled="true" v-model="form.telphone" /></u-form-item>
-				<u-form-item label="身份证号" prop="idCard" :label-width="auto"><u-input placeholder="请实名认证" :disabled="true" v-model="form.idCard" /></u-form-item>
+				<u-form-item label="身份证号" prop="idCard" :label-width="auto"><u-input placeholder="请输入身份证号"  v-model="form.idCard" /></u-form-item>
 				<u-form-item label="性别" prop="sex">
 				<u-form-item label="性别" prop="sex">
 					<picker @change="bindPickerChangeSex" :value="form.sex" :range="array_sex">
 					<picker @change="bindPickerChangeSex" :value="form.sex" :range="array_sex">
 						<view class="picker">{{ array_sex[form.sex] }}</view>
 						<view class="picker">{{ array_sex[form.sex] }}</view>
@@ -139,7 +139,7 @@ export default {
 				realname: [
 				realname: [
 					{
 					{
 						required: true,
 						required: true,
-						message: '请先实名认证',
+						message: '请先输入真名',
 						trigger: 'blur'
 						trigger: 'blur'
 					}
 					}
 				],
 				],
@@ -154,7 +154,7 @@ export default {
 				idCard: [
 				idCard: [
 					{
 					{
 						required: true,
 						required: true,
-						message: '请先实名认证',
+						message: '请先输入身份证号',
 						// 可以单个或者同时写两个触发验证方式
 						// 可以单个或者同时写两个触发验证方式
 						trigger: 'blur'
 						trigger: 'blur'
 					}
 					}
@@ -310,6 +310,7 @@ export default {
 							title: '提交成功',
 							title: '提交成功',
 							icon: 'none'
 							icon: 'none'
 						});
 						});
+						uni.navigateBack();
 					},500);
 					},500);
 					self.$api.refreshUserInfo() 
 					self.$api.refreshUserInfo() 
 				}else{
 				}else{