ソースを参照

修复小程序bug

chenxiong 3 年 前
コミット
920a78c830

+ 3 - 3
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://120.79.166.78:19009'   //预发布
-export const BASE_URL = 'http://42.192.164.187:19005'    //test 
+export const BASE_URL = 'http://120.79.166.78:19009'   //预发布
+// export const BASE_URL = 'http://42.192.164.187:19005'    //test 
 // export const BASE_URL = 'http://192.168.1.222:5055'    //dev
 
  //图片上传api
@@ -17,7 +17,7 @@ export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 // export const socket_url = 'ws://120.79.166.78:19009/webSocket/'  //预发布
 // export const socket_url = 'wss://api.xyyxt.net/webSocket/'  //release
 
-export const version = '5.2.1' 
+export const version = '5.2.2' 
 export const tenantId = '867735392558919680' 
 export const myRequest = (options) => {
 	if (store.state.allowLoading && !options.noLoading) {

+ 1 - 1
pages2/invoice/index.vue

@@ -450,7 +450,7 @@ export default {
 							console.log( reg.test(value),' reg.test(value)')
 							return reg.test(value);
 						},
-						message: '发票抬头格式不正确',
+						message: '纳税登记号格式不正确',
 						// 触发器可以同时用blur和change
 						trigger: ['change'],
 					}

+ 36 - 1
pages2/register/register.vue

@@ -415,7 +415,42 @@ export default {
 									content: '注册成功',
 									showCancel:false,
 									success: function(resst) {
-										uni.navigateBack()
+										// uni.navigateBack()
+										
+										that.$api.accountLogin({
+											account:that.form.tel,
+											pwd:that.form.pwd
+										}).then(res => {
+											if (res.data.code == 200) {
+												if(res.data.data.full_info){
+													//信息完善,直接进入页面
+													uni.setStorageSync('user_account', res.data.data.user_account);
+													uni.setStorageSync('token', res.data.data.token);
+													that.$api.getInfo().then(resdata => {
+														if(resdata.data.code == 200){
+															that.$store.state.userInfo = resdata.data.data;
+															if(!that.isBack){
+																uni.reLaunch({
+																	url:'/pages/index/index'
+																})
+															}else{
+																uni.navigateBack();
+															}
+														}
+														
+													});
+												}else{
+													//未完善信息,存为临时信息
+													uni.setStorageSync('user_account_temp', res.data.data.user_account);
+													uni.setStorageSync('token_temp', res.data.data.token);
+													uni.redirectTo({
+														url:'/pages2/register/bind'
+													})
+												}	
+											} else {
+												that.$u.toast(res.data.msg);
+											}
+										})
 									}
 								});
 							} else {

+ 58 - 13
pages2/verify/input.vue

@@ -9,10 +9,10 @@
 				</view>
 				<view style="color: #007AFF;" @click="backPage">稍后再填</view>
 			</view>
-			<u-collapse v-if="remarkStatus" :item-style="itemStyle" event-type="close" ref="collapse">
+			<u-collapse v-show="remarkStatus" :item-style="itemStyle" event-type="close" ref="collapse">
 				<u-collapse-item title="审核结果反馈">
 					<view style="padding-bottom: 30rpx;">
-						<text class="collapse-item">{{ remark }}</text>
+						<text class="collapse-item">{{ remark || '' }}</text>
 					</view>
 				</u-collapse-item>
 			</u-collapse>
@@ -601,9 +601,18 @@ export default {
 			uni.downloadFile({
 				url: this.$method.splitImgHost(this.form.idcard_face_photo),
 				success:async (res) => {
-					console.log(res,'res')
 					if (res.statusCode === 200) {
 						let resData = await this.faceCertificationIDCardOCR(1,res.tempFilePath);
+						
+						if(!resData.data.data) {
+							uni.showModal({
+								title:'提示',
+								content:'身份证人像面照片异常,请重新上传',
+								showCancel:false,
+							})
+							this.isUploading = false;
+							return;
+						}
 						this.veryIdCard = resData.data.data.IdNum
 						this.veryIdName = resData.data.data.IdName
 						
@@ -630,15 +639,14 @@ export default {
 										  encoding: 'base64',
 										  position: 0,
 										  success:(res) => {
-											  console.log(res)
 											  let base64 = 'data:image/jpg;base64,' + res.data;
-												let data = {
+												let newdata = {
 													idNum:this.veryIdCard,
 													idName:this.veryIdName,
 													oneInchPhotos:base64
 												}
 												
-												this.$api.facCertificationImageRecognition(data).then(res1 => {
+												this.$api.facCertificationImageRecognition(newdata).then(res1 => {
 													if(res1.data.data.sim >= 70) {
 														var self = this;
 														if (self.remarkStatus) {
@@ -682,6 +690,9 @@ export default {
 																orderGoodsId:this.orderGoodsId,
 																keyValue: JSON.stringify(arsty)
 															};
+															console.log(datas,'datas0')
+															// this.isUploading = false;
+															// return;
 															this.$api.editbaseprofiletp(datas).then(res => {
 																this.isUploading = false;
 																if (res.data.code === 200) {
@@ -714,6 +725,11 @@ export default {
 																orderGoodsId:this.orderGoodsId,
 																keyValue: JSON.stringify(objs)
 															};
+															
+															
+															console.log(data,'datas')
+															// this.isUploading = false;
+															// return;
 															this.$api.addbaseprofiletp(datas).then(res => {
 																this.isUploading = false;
 																if (res.data.code === 200) {
@@ -790,12 +806,26 @@ export default {
 						}
 					}
 				}
+				
+				console.log(arsty,'arsty')
+				if(Object.keys(arsty).length == 0) {
+					uni.showModal({
+						title:'提示',
+						content:'数据错误,请联系管理员'
+					})
+					this.isUploading = false;
+					return;
+				}
 				var datas = {
 					id: this.id,
 					goodsId: this.goodsId,
 					orderGoodsId:this.orderGoodsId,
 					keyValue: JSON.stringify(arsty)
 				};
+				
+				console.log(datas,'datas1')
+				
+				// return;
 				this.$api.editbaseprofiletp(datas).then(res => {
 					this.isUploading = false;
 					if (res.data.code === 200) {
@@ -828,6 +858,11 @@ export default {
 					orderGoodsId:this.orderGoodsId,
 					keyValue: JSON.stringify(objs)
 				};
+				
+				
+				console.log(datas,'datas2')
+				// this.isUploading = false;
+				// return;
 				this.$api.addbaseprofiletp(datas).then(res => {
 					this.isUploading = false;
 					if (res.data.code === 200) {
@@ -837,7 +872,7 @@ export default {
 						this.$method.showToast(res.data.msg);
 						this.isUploading = false;
 					}
-				});
+				}).catch(err => {});
 			}
 		},
 		backPage() {
@@ -859,6 +894,7 @@ export default {
 				data.recent_photos = await this.$method.uploadFile(data.recent_photos, 0);
 			}
 			if (data['idcard_face_photo']) {
+				console.log('idcard_face_photo')
 				data.idcard_face_photo = await this.$method.uploadFile(data.idcard_face_photo, 0);
 			}
 			if (data['idcard_national_photo']) {
@@ -867,10 +903,14 @@ export default {
 			if (data['commitment_electr_signature']) {
 				data.commitment_electr_signature = await this.$method.uploadFile(data.commitment_electr_signature, 0);
 			}
+			
+			
 			this.uploadDatas(data);
 		},
 		//验证表单
 		resultForm(int) {
+			console.log(this.openVerify,'openVerify')
+			console.log(this.isRequired,'isRequired')
 			if (this.openVerify) {
 				if (this.isRequired) {
 					this.submitApi();
@@ -921,9 +961,7 @@ export default {
 				  encoding: 'base64',
 				  position: 0,
 				  success:(res) => {
-					  console.log(res)
 					  let base64 = 'data:image/jpg;base64,' + res.data;
-					  console.log(base64)
 					  this.$api.faceCertificationIDCardOCR({
 					  	cardSide:cardSide,  //1人像  2 国徽
 					  	cardImageBase64:base64,
@@ -952,6 +990,7 @@ export default {
 				this.$set(this.form, 'recent_photos', '');
 				console.log(3, this.form.recent_photos);
 			}
+			this.openVerify = false;
 			this.$nextTick(function() {
 				console.log(4);
 				this.resultForm();
@@ -975,12 +1014,14 @@ export default {
 					this.$refs.idcard_face_photo[0].lists = [{
 						url:this.$method.splitImgHost(res.data.data.IdImgPath)
 					}]; 
-					this.$set(this.form, 'idcard_face_photo', res.data.data.IdImgPath,1000);
+					this.$set(this.form, 'idcard_face_photo', res.data.data.IdImgPath);
+					console.log(this.form,'idcard_face_photo')
 				}
 			} else {
 				this.fileList2 = [];
 				this.$set(this.form, 'idcard_face_photo', '');
 			}
+			this.openVerify = false;
 			this.$nextTick(function() {
 				this.resultForm();
 			});
@@ -1004,11 +1045,13 @@ export default {
 						url:this.$method.splitImgHost(res.data.data.IdImgPath)
 					}]; 
 					this.$set(this.form, 'idcard_national_photo', res.data.data.IdImgPath);
+					console.log(this.form,'idcard_national_photo')
 				}
 			} else {
 				this.fileList3 = [];
 				this.$set(this.form, 'idcard_national_photo', '');
 			}
+			this.openVerify = false;
 			this.$nextTick(function() {
 				this.resultForm();
 			});
@@ -1022,11 +1065,9 @@ export default {
 		},
 		getarrays(key) {
 			if (key === 'sex') {
-				console.log(this.dictObj)
 				return this.dictObj['sys_user_sex'];
 			}
 			if (key === 'education') {
-				console.log(this.dictObj['edu_level'])
 				return this.dictObj['edu_level'];
 			}
 			if (key === 'working_years') {
@@ -1060,6 +1101,7 @@ export default {
 		 *  getbaseprofiletpgetInfo接口返回值result.data.data不存在的话说明是第一次填写资料
 		 */
 		getInfo() {
+			console.log('getInfo')
 			var self = this;
 			this.$api.getbaseprofiletpId(this.goodsId).then(res => {
 				self.listData = JSON.parse(res.data.data.keyValue);
@@ -1080,6 +1122,7 @@ export default {
 				self.isRequired = self.listData.every(ims => {
 					return ims.required === false;
 				});
+				console.log(self.isRequired ,'self.isRequired ')
 				this.$nextTick(() => {
 					this.agreementModal = true;
 				})
@@ -1133,6 +1176,7 @@ export default {
 								}
 							});
 						}
+						console.log(result.data.data,'result.data.data')
 						if (result.data.data && result.data.data.status === 3) {
 							self.remark = result.data.data.text;
 							self.remarkStatus = true;
@@ -1196,6 +1240,7 @@ export default {
 		},
 		bindPickerChange(key, e) {
 			this.$set(this.form, key, e.detail.value);
+			this.openVerify = false;
 			this.$nextTick(function() {
 				this.resultForm();
 			});
@@ -1206,6 +1251,7 @@ export default {
 		retDraw() {
 			this.handwriting.retDraw();
 			this.$set(this.form, 'commitment_electr_signature', '');
+			this.openVerify = false;
 			this.$nextTick(function() {
 				this.resultForm();
 			});
@@ -1229,7 +1275,6 @@ export default {
 				self.handwriting
 					.saveCanvas()
 					.then(res => {
-						console.log(res,'res')
 						if (this.handwriting.linePrack.length) {
 							this.$set(this.form, 'commitment_electr_signature', res);
 						}

+ 9 - 9
pages3/polyv/detail.vue

@@ -596,7 +596,7 @@ export default {
     };
   },
   computed: {
-    ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID","playObj"]),
+    ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID"]),
   },
   onLoad(option) {
     this.courseId = Number(option.id);
@@ -771,7 +771,7 @@ export default {
       this.postStudyRecord();
     }
     //清除正在播放的节ID
-		this.$store.commit('setPlayObj',null)
+		// this.$store.commit('setPlayObj',null)
     this.$store.commit("setPlaySectionId", { playSectionId: 0 });
     this.$store.commit("setPlayChannelId", { playChannelId: 0 });
     this.$store.commit("setPlayVID", { playVID: null });
@@ -838,7 +838,7 @@ export default {
     this.updateChapterOpen(true);
   },
   methods: {
-    ...mapMutations(["updateChapterOpen","setPlayObj"]),
+    ...mapMutations(["updateChapterOpen"]),
     /**
      * 模块大节播放完毕,刷新列表
      */
@@ -1172,10 +1172,10 @@ export default {
             //大于15分钟
             if (photoNum == 1) {
               //开头拍1张
-              this.photoList.push(1);
+              this.photoList.push(0);
             } else if (photoNum == 3) {
               //拍3张
-              this.photoList.push(1); //开头拍一张
+              this.photoList.push(0); //开头拍一张
               let centerTime = Math.floor(totalVideoTime / 2); //获取中间时间
               let centerMinTime = centerTime - 300; //前后5分钟
               let centerMaxTime = centerTime + 300;
@@ -1190,16 +1190,16 @@ export default {
             //小于15分钟,只拍前后各一张
             if (photoNum == 1) {
               //开头拍1张
-              this.photoList.push(1);
+              this.photoList.push(0);
             } else if (photoNum == 3) {
               //拍2张
               if (totalVideoTime <= 300) {
                 //小于5分钟
-                this.photoList.push(1); //开头拍一张
+                this.photoList.push(0); //开头拍一张
                 let endTakeTime = this.randomNum(10, totalVideoTime); //中间随机取一张
                 this.photoList.push(endTakeTime);
               } else {
-                this.photoList.push(1); //开头拍一张
+                this.photoList.push(0); //开头拍一张
                 let endMaxTime = totalVideoTime - 60;
                 let endMinTime = totalVideoTime - 300;
                 let endTakeTime = this.randomNum(endMinTime, endMaxTime);
@@ -1930,7 +1930,7 @@ export default {
       this.uploadLock = true;
 
       let compareFaceData = await this.faceRecognition();
-
+			console.log(compareFaceData,'compareFaceData')
       if (compareFaceData >= 80) {
         const waitYS = await this.imageInfos();
         this.postCoursePhotoRecord()