Forráskód Böngészése

极光key,上传成功

zouling 9 hónapja
szülő
commit
4466e4862f
4 módosított fájl, 136 hozzáadás és 106 törlés
  1. 1 1
      1.txt
  2. 4 4
      pages/mine/pwd/forgetpwd.vue
  3. 29 22
      work/components/popup/popup.vue
  4. 102 79
      work/pages/business/add.vue

+ 1 - 1
1.txt

@@ -9,4 +9,4 @@ SHA1: C3:9C:FB:30:66:12:DC:CD:23:8D:3A:2E:77:19:B4:96:30:20:8C:AE
 
 高德key:
 
-极光appkey:
+极光appkey:a6413fdbfa71dd4f27f4c9f4

+ 4 - 4
pages/mine/pwd/forgetpwd.vue

@@ -81,10 +81,10 @@
 			that.$toast("请输入验证码")
 			return
 		}
-		if(this.code!=this.newcode){
-			that.$toast("验证码错误,请重新输入")
-			return
-		}
+		// if(this.code!=this.newcode){
+		// 	that.$toast("验证码错误,请重新输入")
+		// 	return
+		// }
 		let regphone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
 		if (this.phonenumber && !regphone.test(this.phonenumber)) {
 			that.$toast("请输入正确的手机号")

+ 29 - 22
work/components/popup/popup.vue

@@ -1101,33 +1101,41 @@
 			onuploadEnd(item,fileVal,bigType) {
 				var newobj={}
 				var responseText=JSON.parse(item.responseText)
-				if(fileVal=='qtfj'){
-					newobj.name=responseText.originalFilename;
+				if(responseText.code==200){
+					if(fileVal=='qtfj'){
+						newobj.name=responseText.originalFilename;
+					}else{
+						newobj.name=responseText.newFileName;
+					}
+					newobj.oldName=responseText.originalFilename;
+					newobj.url=responseText.fileName;
+					newobj.type=fileVal;
+					newobj.bigType=bigType;
+					newobj.loanApplicationId=this.loanApplicationId;
+					newobj.loanApplicationNumber=this.loanApplicationNumber;
+					this.filelist.push(newobj)
 				}else{
-					newobj.name=responseText.newFileName;
+					this.$toast(responseText.msg)
 				}
-				newobj.oldName=responseText.originalFilename;
-				newobj.url=responseText.fileName;
-				newobj.type=fileVal;
-				newobj.bigType=bigType;
-				newobj.loanApplicationId=this.loanApplicationId;
-				newobj.loanApplicationNumber=this.loanApplicationNumber;
-				this.filelist.push(newobj)
 			},
 			editonuploadEnd(item,fileVal,bigType) {
 				var newobj={}
 				var responseText=JSON.parse(item.responseText)
-				newobj.name=responseText.newFileName;
-				newobj.oldName=responseText.originalFilename;
-				newobj.url=responseText.fileName;
-				newobj.type=fileVal;
-				newobj.bigType=bigType;
-				newobj.loanApplicationId=this.loanApplicationId;
-				newobj.loanApplicationNumber=this.loanApplicationNumber;
-				newobj.fjId=this.fjId;
-				var newArr=[];
-				newArr.push(newobj);
-				this.filelist=JSON.parse(JSON.stringify(newArr))
+				if(responseText.code==200){
+					newobj.name=responseText.newFileName;
+					newobj.oldName=responseText.originalFilename;
+					newobj.url=responseText.fileName;
+					newobj.type=fileVal;
+					newobj.bigType=bigType;
+					newobj.loanApplicationId=this.loanApplicationId;
+					newobj.loanApplicationNumber=this.loanApplicationNumber;
+					newobj.fjId=this.fjId;
+					var newArr=[];
+					newArr.push(newobj);
+					this.filelist=JSON.parse(JSON.stringify(newArr))
+				}else{
+					this.$toast(responseText.msg)
+				}
 			},
 			
 			// 借据上传
@@ -1150,7 +1158,6 @@
 				}else{
 					this.$toast(responseText.msg)
 				}
-				
 			},
 			getDelFj(idx){
 				var that=this;

+ 102 - 79
work/pages/business/add.vue

@@ -2625,24 +2625,28 @@
 			ponuploadEnd(item,fileVal,bigType){
 				var newobj={}
 				var responseText=JSON.parse(item.responseText)
-				var url=responseText.fileName
-				var urlOnline=responseText.urlOnline
-				if(fileVal=='frsfzrmx'){
-					this.datainfo.corporationFront=url;
-					// 获取姓名 身份证号
-					this.getocrIdCard(urlOnline,fileVal)
-				}else if(fileVal=='frsfzghm'){
-					this.datainfo.corporationBack=url
-				}else if(fileVal=='frsfzpormx'){
-					this.datainfo.spouseFront=url
-					this.getocrIdCard(urlOnline,fileVal)
-				}else if(fileVal=='frsfzpoghm'){
-					this.datainfo.spouseBack=url
-				// }else if(fileVal=='fdbrsfzrmx'){
-				// 	this.getocrIdCard(urlOnline,fileVal)
-				// 	this.datainfo.guaranteeFront=url
-				// }else if(fileVal=='fdbrsfzghm'){
-				// 	this.datainfo.guaranteeBack=url
+				if(responseText.code==200){
+					var url=responseText.fileName
+					var urlOnline=responseText.urlOnline
+					if(fileVal=='frsfzrmx'){
+						this.datainfo.corporationFront=url;
+						// 获取姓名 身份证号
+						this.getocrIdCard(urlOnline,fileVal)
+					}else if(fileVal=='frsfzghm'){
+						this.datainfo.corporationBack=url
+					}else if(fileVal=='frsfzpormx'){
+						this.datainfo.spouseFront=url
+						this.getocrIdCard(urlOnline,fileVal)
+					}else if(fileVal=='frsfzpoghm'){
+						this.datainfo.spouseBack=url
+					// }else if(fileVal=='fdbrsfzrmx'){
+					// 	this.getocrIdCard(urlOnline,fileVal)
+					// 	this.datainfo.guaranteeFront=url
+					// }else if(fileVal=='fdbrsfzghm'){
+					// 	this.datainfo.guaranteeBack=url
+					}
+				}else{
+					this.$toast(responseText.msg)
 				}
 			},
 			getDocumentList(){
@@ -2762,15 +2766,19 @@
 			onuploadEnd(item,fileVal,bigType) {
 				var newobj={}
 				var responseText=JSON.parse(item.responseText)
-				newobj.name=responseText.newFileName;
-				newobj.oldName=responseText.originalFilename;
-				newobj.url=responseText.fileName;
-				newobj.type=fileVal;
-				newobj.bigType=bigType;
-				this.filelist.push(newobj)
-				this.datainfo.loanApplicationFjList=JSON.parse(JSON.stringify(this.filelist))
-				if(fileVal=='fdbqyyyzz'){
-					this.datainfo.guaranteeShareholderName='';
+				if(responseText.code==200){
+					newobj.name=responseText.newFileName;
+					newobj.oldName=responseText.originalFilename;
+					newobj.url=responseText.fileName;
+					newobj.type=fileVal;
+					newobj.bigType=bigType;
+					this.filelist.push(newobj)
+					this.datainfo.loanApplicationFjList=JSON.parse(JSON.stringify(this.filelist))
+					if(fileVal=='fdbqyyyzz'){
+						this.datainfo.guaranteeShareholderName='';
+					}
+				}else{
+					this.$toast(responseText.msg)
 				}
 			},
 			// 股东附件上传 fileVal 为索引
@@ -2779,67 +2787,79 @@
 				var type=bigType;
 				var obj=this.gdlist[idx];
 				var responseText=JSON.parse(item.responseText);
-				if(type=='cardz'){
-					obj.cardz=responseText.fileName
-				}else if(type=='cardf'){
-					obj.cardf=responseText.fileName
-				}else if(type=='zx'){
-					obj.zxurl.push(responseText.fileName)
-					// obj.zxurl[0]=responseText.fileName
-				}else if(type=='zhz'){
-					// obj.zhizhao.push(responseText.fileName)
-					// obj.zhizhao[0]=responseText.fileName
-					this.getOcrBusinessLicense(responseText.urlOnline,responseText.fileName,idx)
-					return
+				if(responseText.code==200){
+					if(type=='cardz'){
+						obj.cardz=responseText.fileName
+					}else if(type=='cardf'){
+						obj.cardf=responseText.fileName
+					}else if(type=='zx'){
+						obj.zxurl.push(responseText.fileName)
+						// obj.zxurl[0]=responseText.fileName
+					}else if(type=='zhz'){
+						// obj.zhizhao.push(responseText.fileName)
+						// obj.zhizhao[0]=responseText.fileName
+						this.getOcrBusinessLicense(responseText.urlOnline,responseText.fileName,idx)
+						return
+					}
+					console.log(this.gdlist,3)
+					this.gdlist.splice(idx,1,obj)
+					// this.datainfo.shareholderFjList=JSON.parse(JSON.stringify(this.gdlist))
+				}else{
+					this.$toast(responseText.msg)
 				}
-				console.log(this.gdlist,3)
-				this.gdlist.splice(idx,1,obj)
-				// this.datainfo.shareholderFjList=JSON.parse(JSON.stringify(this.gdlist))
 			},
 			// 反担保附件上传bigType 为索引
 			fdbuploadEnd(item,fileVal,bigType){
 				var idx=Number(bigType);
 				var obj=this.fdarlist[idx].guaranteeInfoFjList;
 				var responseText=JSON.parse(item.responseText);
-				var urlOnline=responseText.urlOnline
-				// 附件赋值
-				var newobj={};
-				newobj.name=responseText.newFileName;
-				newobj.oldName=responseText.originalFilename;
-				newobj.url=responseText.fileName;
-				newobj.type=fileVal;
-				if(fileVal=='fdbrsfzrmx'||fileVal=='fdbrsfzghm'){//身份证
-					// 找索引
-					const index = obj.findIndex(text => text.type === fileVal);
-					if(index!=-1){
-						this.fdarlist[idx].guaranteeInfoFjList.splice(index,1,newobj)
-					}else{
-						this.fdarlist[idx].guaranteeInfoFjList.push(newobj)
-					}
-					if(fileVal=='fdbrsfzrmx'){
-						this.getocrIdCard(urlOnline,fileVal,idx)
+				if(responseText.code==200){
+					var urlOnline=responseText.urlOnline
+					// 附件赋值
+					var newobj={};
+					newobj.name=responseText.newFileName;
+					newobj.oldName=responseText.originalFilename;
+					newobj.url=responseText.fileName;
+					newobj.type=fileVal;
+					if(fileVal=='fdbrsfzrmx'||fileVal=='fdbrsfzghm'){//身份证
+						// 找索引
+						const index = obj.findIndex(text => text.type === fileVal);
+						if(index!=-1){
+							this.fdarlist[idx].guaranteeInfoFjList.splice(index,1,newobj)
+						}else{
+							this.fdarlist[idx].guaranteeInfoFjList.push(newobj)
+						}
+						if(fileVal=='fdbrsfzrmx'){
+							this.getocrIdCard(urlOnline,fileVal,idx)
+						}
+						return
 					}
-					return
+					this.fdarlist[idx].guaranteeInfoFjList.push(newobj)
+				}else{
+					this.$toast(responseText.msg)
 				}
-				this.fdarlist[idx].guaranteeInfoFjList.push(newobj)
 			},
 			// 反担保企业附件上传bigType 为索引
 			fdbqyuploadEnd(item,fileVal,bigType){
 				var idx=Number(bigType);
 				var obj=this.fdaqylist[idx].guaranteeInfoFjList;
 				var responseText=JSON.parse(item.responseText);
-				var urlOnline=responseText.urlOnline
-				// 附件赋值
-				var newobj={};
-				newobj.name=responseText.newFileName;
-				newobj.oldName=responseText.originalFilename;
-				newobj.url=responseText.fileName;
-				newobj.type=fileVal;
-				if(fileVal=='fdbqyyyzz'){
-					this.getOcrBusinessLicensefdb(newobj,urlOnline,idx)
-					return
+				if(responseText.code==200){
+					var urlOnline=responseText.urlOnline
+					// 附件赋值
+					var newobj={};
+					newobj.name=responseText.newFileName;
+					newobj.oldName=responseText.originalFilename;
+					newobj.url=responseText.fileName;
+					newobj.type=fileVal;
+					if(fileVal=='fdbqyyyzz'){
+						this.getOcrBusinessLicensefdb(newobj,urlOnline,idx)
+						return
+					}
+					this.fdaqylist[idx].guaranteeInfoFjList.push(newobj)
+				}else{
+					this.$toast(responseText.msg)
 				}
-				this.fdaqylist[idx].guaranteeInfoFjList.push(newobj)
 			},
 			// 申请附件上传
 			fjonuploadEnd(item,fileVal,bigType,idx){
@@ -2847,13 +2867,16 @@
 				var newobj={};
 				var sbfjlist=this.sbfjlist[idx].fjlist;
 				var responseText=JSON.parse(item.responseText)
-				newobj.name=responseText.newFileName;
-				newobj.oldName=responseText.originalFilename;
-				newobj.url=responseText.fileName;
-				newobj.type=fileVal;
-				newobj.bigType=bigType;
-				this.sbfjlist[idx].fjlist.push(newobj)
-				
+				if(responseText.code==200){
+					newobj.name=responseText.newFileName;
+					newobj.oldName=responseText.originalFilename;
+					newobj.url=responseText.fileName;
+					newobj.type=fileVal;
+					newobj.bigType=bigType;
+					this.sbfjlist[idx].fjlist.push(newobj)
+				}else{
+					this.$toast(responseText.msg)
+				}
 			},
 			getDelsbFj(idx,fidx){
 				var that=this;