Browse Source

Merge branch 'master' of https://gitee.com/he2802/saas_applet

chenxiong 3 years ago
parent
commit
d8e10b79b6

+ 8 - 0
common/httpList/profileTp.js

@@ -42,6 +42,14 @@ export default {
 			data: data
 		})
 	},
+	//查询填写资料审核列表
+	getbaseprofiletplistProfile(data) {
+		return myRequest({
+			url: '/base/profile/tp/listProfile',
+			method: 'get',
+			data: data
+		})
+	},
 	//获取资料模板详细信息
 	getbaseprofiletpId(data) {
 		return myRequest({

+ 6 - 4
common/request.js

@@ -5,8 +5,8 @@ import api from './api.js'
 var num = 1
 //接口api   
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
-export const BASE_URL = 'http://42.192.164.187:19005'  //test
-// export const BASE_URL = 'http://192.168.1.222:5055'    //dev
+// export const BASE_URL = 'http://42.192.164.187:19005'  //test
+export const BASE_URL = 'http://192.168.1.222:5055'    //dev
 
  //图片上传api
 // export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
@@ -33,7 +33,7 @@ export const myRequest = (options) => {
 			},
 			success: async (res) => {
 				if (res.data.code == 401) {
-					if (num <= 3) {
+					if (num <= 2) {
 						if (!uni.getStorageSync('user_account')) {
 							uni.navigateTo({
 								url: '/pages/login/login'
@@ -43,7 +43,9 @@ export const myRequest = (options) => {
 							res = await doRequest(options)
 						}
 
-					};
+					}else{
+						uni.removeStorageSync('user_account')
+					}
 				}
 				resolve(res)
 			},

+ 4 - 4
common/signature.js

@@ -36,11 +36,11 @@ class Handwriting {
 		this.ctx = uni.createCanvasContext(this.canvasName)
 		var query = uni.createSelectorQuery();
 		query.select('.handCenter').boundingClientRect(rect => {
-			if(rect.width){
-			this.canvasWidth = rect.width;
+			if (rect.width) {
+				this.canvasWidth = rect.width;
 			}
-			if(rect.height){
-			this.canvasHeight = rect.height;
+			if (rect.height) {
+				this.canvasHeight = rect.height;
 			}
 		}).exec();
 		this.selectSlideValue(this.slideValue);

+ 1 - 0
pages/course/index.vue

@@ -158,6 +158,7 @@ export default {
 	},
 	onLoad(option) {
 		let eduStr = uni.getStorageSync('eduObj')
+		console.log(eduStr,987)
 		if(eduStr){
 			this.selObj = JSON.parse(eduStr)
 			this.subjectList({businessId:this.selObj.bId,projectId:this.selObj.pId,educationId:this.selObj.eId})

+ 3 - 1
pages/shopping/shoppingCart.vue

@@ -182,7 +182,9 @@ export default {
 			examIndex: 0
 		};
 	},
-	onLoad(option) {},
+	onLoad(option) {
+		console.log(option,987)
+	},
 	onShow() {
 		this.isLogin = this.$method.isLogin();
 		if (this.isLogin) {

+ 5 - 3
pages/wd/index.vue

@@ -38,7 +38,7 @@
 						<view>我的题库通</view>
 					</navigator>
 				</view>
-				<navigator  hover-class="none" url="/pages2/learn/my_learn" class="menu_box">
+				<navigator  hover-class="none" url="/pages2/learn/my_learn" class="menu_box" v-if="true">
 					<view class="box_left">
 						<image src="/static/icon/my_icon2.png" class="my_icon"></image>
 						<view>我的学时</view>
@@ -49,7 +49,7 @@
 						学时未通过
 					</view>
 				</navigator>
-				<navigator  hover-class="none" url="/pages2/exam/index" class="menu_box">
+				<navigator  hover-class="none" url="/pages2/exam/index" class="menu_box" v-if="true">
 					<view class="box_left">
 						<image src="/static/icon/my_icon10.png" class="my_icon"></image>
 						<view>我的考试</view>
@@ -108,7 +108,9 @@ export default {
 			userNums: {}
 		};
 	},
-	onLoad() {},
+	onLoad(option) {
+		console.log(option,987)
+	},
 	onShow() {
 		this.isLogin = this.$method.isLogin();
 		if(this.isLogin){

+ 2 - 1
pages2/class/detail.vue

@@ -25,7 +25,7 @@
 					<u-col span="10">
 						<view class="video_t1">{{ detail.courseName }}</view>
 					</u-col>
-					<u-col span="2">
+					<u-col span="2" v-if="false">
 						<view class="video_t1_t" @click="openJY">
 							<image src="/static/icon/jy_icon.png" style="width: 40rpx;height: 40rpx;"></image>
 							讲义
@@ -344,6 +344,7 @@ export default {
 	},
 	onUnload() {
 		if (this.playSectionId > 0) {
+			console.log(234234)
 			//退出提交记录
 			this.ossAvatarUrl = '';
 			this.postStudyRecord();

+ 80 - 22
pages2/verify/input.vue

@@ -107,16 +107,6 @@
 					>
 						<u-input v-model="form.major" :placeholder="`请输入${item.fieldName}`" />
 					</u-form-item>
-					<!-- <u-form-item
-						:key="index"
-						v-if="item.fieldKey == 'apply_post'"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<u-input v-model="form.apply_post" :placeholder="`请输入${item.fieldName}`" />
-					</u-form-item> -->
 					<u-form-item
 						:key="index"
 						v-if="item.inputType == 2"
@@ -126,7 +116,16 @@
 						: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) }}</u-icon> <image src="@/static/icon/clears.png" v-if="clearWatch(item.fieldKey)" @click.stop="clearFun(item.fieldKey)" mode="" style="width:30rpx;height:30rpx;vertical-align: middle;margin-left:10rpx;"></image> </view>
+							<view class="picker">
+								{{ returnName(item.fieldKey) }}
+								<image
+									src="@/static/icon/clears.png"
+									v-if="clearWatch(item.fieldKey)"
+									@click.stop="clearFun(item.fieldKey)"
+									mode=""
+									style="width:30rpx;height:30rpx;vertical-align: middle;margin-left:10rpx;"
+								></image>
+							</view>
 						</picker>
 					</u-form-item>
 					<u-form-item
@@ -138,7 +137,16 @@
 						:prop="item.required ? item.fieldKey : ''"
 					>
 						<picker mode="date" :value="form[item.fieldKey]" @change="bindDateChange(item.fieldKey, $event)">
-							<view class="picker">{{ getTimes(item.fieldKey) }} <image src="@/static/icon/clears.png" v-if="clearWatch(item.fieldKey)" @click.stop="clearFun(item.fieldKey)" mode="" style="width:30rpx;height:30rpx;vertical-align: middle;margin-left:10rpx;"></image> </view>
+							<view class="picker">
+								{{ getTimes(item.fieldKey) }}
+								<image
+									src="@/static/icon/clears.png"
+									v-if="clearWatch(item.fieldKey)"
+									@click.stop="clearFun(item.fieldKey)"
+									mode=""
+									style="width:30rpx;height:30rpx;vertical-align: middle;margin-left:10rpx;"
+								></image>
+							</view>
 						</picker>
 					</u-form-item>
 					<u-form-item
@@ -214,7 +222,7 @@
 						<u-form-item
 							v-if="item.inputType == 3 && item.fieldKey === 'commitment_electr_signature'"
 							label="承诺书"
-							:required="true"
+							:required="item.required"
 							:label-width="auto"
 							label-position="top"
 						>
@@ -229,7 +237,7 @@
 						<u-form-item
 							v-if="item.inputType == 3 && item.fieldKey === 'commitment_electr_signature'"
 							label="签名板"
-							:required="true"
+							:required="item.required"
 							:label-width="auto"
 							label-position="top"
 							:prop="item.required ? item.fieldKey : ''"
@@ -482,15 +490,15 @@ export default {
 	},
 	computed: { ...mapGetters(['dictObj']) },
 	methods: {
-		clearFun(key){
-			this.form[key] = ''
+		clearFun(key) {
+			this.form[key] = '';
 		},
 		//清除按钮
-		clearWatch(key){
-			if(this.form[key]){
-				return true
-			}else{
-				return false
+		clearWatch(key) {
+			if (this.form[key]) {
+				return true;
+			} else {
+				return false;
 			}
 		},
 		cahngeText() {
@@ -716,6 +724,9 @@ export default {
 				}
 			}
 		},
+		/**
+		 *  getbaseprofiletpgetInfo接口返回值result.data.data不存在的话说明是第一次填写资料
+		 */
 		getInfo() {
 			var self = this;
 			this.$api.getbaseprofiletpId(this.goodsId).then(res => {
@@ -723,9 +734,56 @@ export default {
 				self.isRequired = self.listData.every(ims => {
 					return ims.required === false;
 				});
-				console.log(self.isRequired);
 				self.$api.getbaseprofiletpgetInfo({ goodsId: self.goodsId }).then(result => {
 					if (result.data.code === 200) {
+						if (!result.data.data) {
+							self.$api.getbaseprofiletplistProfile({ pageNum: 1, pageSize: 1, status: 1 }).then(kit => {
+								if (kit.data.rows.length) {
+									var ajson = JSON.parse(kit.data.rows[0].keyValue);
+									self.listData.forEach((zyitem, zyindex) => {
+										for (let k in ajson) {
+											if (zyitem.fieldKey == k && ajson[k].value) {
+												if (k === 'sex') {
+													const sexIndex = self.dictObj['sys_user_sex'].indexOf(ajson[k].value) + '';
+													self.$set(self.form, k, sexIndex);
+												} else if (k === 'education') {
+													const sexIndex = self.dictObj['edu_level'].indexOf(ajson[k].value) + '';
+													self.$set(self.form, k, sexIndex);
+												} else if (k === 'working_years') {
+													const sexIndex = self.dictObj['working_years'].indexOf(ajson[k].value) + '';
+													self.$set(self.form, k, sexIndex);
+												} else if (k === 'recent_photos') {
+													self.$set(self.form, k, ajson[k].value);
+													if (ajson[k].value) {
+														self.fileList1 = [{ url: baseUrls.BASE_IMG_URL + ajson[k].value }];
+													}
+												} else if (k === 'idcard_face_photo') {
+													self.$set(self.form, k, ajson[k].value);
+													if (ajson[k].value) {
+														self.fileList2 = [{ url: baseUrls.BASE_IMG_URL + ajson[k].value }];
+													}
+												} else if (k === 'idcard_national_photo') {
+													self.$set(self.form, k, ajson[k].value);
+													if (ajson[k].value) {
+														self.fileList3 = [{ url: baseUrls.BASE_IMG_URL + ajson[k].value }];
+													}
+												} else {
+													if(k === 'name'){
+														self.$set(self.form, k, this.$store.state.userInfo.realname);
+													} else if(k === 'idcard'){
+														self.$set(self.form, k, this.$store.state.userInfo.idCard);
+													} else if(k === 'telphone'){
+														self.$set(self.form, k, this.$store.state.userInfo.telphone);
+													} else if(k !== 'commitment_electr_signature'){
+														self.$set(self.form, k, ajson[k].value);
+													}
+												}
+											}
+										}
+									});
+								}
+							});
+						}
 						if (result.data.data && result.data.data.status === 3) {
 							self.remark = result.data.data.text;
 							self.remarkStatus = true;