瀏覽代碼

Merge branch 'test' of git.echepei.com:sailun/sailun-tbr-web into test

caojunjie 4 年之前
父節點
當前提交
97255790e7
共有 4 個文件被更改,包括 74 次插入54 次删除
  1. 8 20
      common/request/request.js
  2. 4 0
      pages/login/index.vue
  3. 55 30
      pages/login/register.vue
  4. 7 4
      pages/login/register_3.vue

+ 8 - 20
common/request/request.js

@@ -38,31 +38,19 @@ export function request(config) {
 	    let { message } = error;
 	    if (message == "Network Error") {
 	      message = "系统接口连接异常";
-		  uni.showToast({
-		  	icon: 'none',
-		  	title: message,
-		  	position: "bottom"
-		  })
 	    }
 	    else if (message.includes("timeout")) {
 	      message = "系统接口请求超时";
-		  uni.showToast({
-		  	icon: 'none',
-		  	title: message,
-		  	position: "bottom"
-		  })
 	    }
-	    else if (message.includes("Request failed with status code")) {
-	      message = "系统接口" + message.substr(message.length - 3) + "异常";
+	   //  else if (message.includes("Request failed with status code")) {
+	   //    message = "系统接口" + message.substr(message.length - 3) + "异常";
 		  
-		  uni.showToast({
-		  	icon: 'none',
-		  	title: message,
-		  	position: "bottom"
-		  })
-		  
-	    }
-		console.log(message)
+	   //  }
+		uni.showToast({
+			icon: 'none',
+			title: message,
+			position: "bottom"
+		})
 	    return Promise.reject(error)
 	  }
 	)

+ 4 - 0
pages/login/index.vue

@@ -83,6 +83,7 @@
 					this.networkType = res.networkType
 				}
 			});
+			// #ifdef APP-PLUS
 			uni.getLocation({
 			    success:res=>{
 			    },
@@ -94,9 +95,12 @@
 					}	
 				}
 			});
+			// #endif
+			// #ifdef APP-PLUS
 			plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
 				this.version=wgtinfo.version
 			})
+			// #endif
 			uni.$on('loginphone',data=>{
 				this.tel=data
 			})

+ 55 - 30
pages/login/register.vue

@@ -33,9 +33,10 @@
 		</view>
 		<view style="margin: 30rpx;">
 			<u-button type="primary" @click="nextStep" v-if="showLicense&&showStore">下一步</u-button>
-						<!-- <u-button type="primary" @click="nextStep">下一步</u-button> -->
+			<!-- <u-button type="primary" @click="nextStep">下一步</u-button> -->
 		</view>
-		<u-modal v-model="modalShow" :content="storecontent" :show-cancel-button="true" confirm-text="同意" cancel-text="不同意" @cancel="cancelModal"></u-modal>
+		<u-modal v-model="modalShow" :content="storecontent" :show-cancel-button="true" confirm-text="同意" cancel-text="不同意"
+		 @cancel="cancelModal"></u-modal>
 	</view>
 </template>
 
@@ -54,53 +55,77 @@
 				storepicType: {
 					"pictype": "store"
 				},
-				showLicense:false,
-				showStore:false,
-				modalShow:false,
-				storecontent:"此操作需要上传正规的营业执照照片,并确保系统识别出来的信息与营业执照一致,是否同意?",
-				Analyse:"正在识别,请稍等"
+				showLicense: false,
+				showStore: false,
+				modalShow: false,
+				storecontent: "此操作需要上传正规的营业执照照片,并确保系统识别出来的信息与营业执照一致,是否同意?",
+				Analyse: "正在识别,请稍等",
+				appStoreBusinessLicenseDto: ''
 			};
 		},
 		created() {
 			uni.getSystemInfo({
-			    success:res=>{
-					this.SystemInfo=res
-			    }
+				success: res => {
+					this.SystemInfo = res
+				}
 			});
-			if(this.SystemInfo.platform=='ios'){
+			if (this.SystemInfo.platform == 'ios') {
 				uni.showModal({
 					title: "温馨提示",
 					content: "此操作需要上传正规的营业执照照片,并确保系统识别出来的信息与营业执照一致,是否同意?",
 					cancelText: "不同意",
 					confirmText: "同意",
-					success:res=> {
+					success: res => {
 						if (res.cancel) {
 							uni.navigateBack({})
 						}
 					}
 				})
-			}else{
-				this.modalShow=true
+			} else {
+				this.modalShow = true
 			}
 		},
 		methods: {
 			nextStep() {
-				if(this.Analyse!="success"){
+				if (this.Analyse != "success") {
 					this.$u.toast(this.Analyse);
 					return
 				}
 				this.$u.route({
 					url: 'pages/login/register_2',
 				})
-				if(this.licenseDate){
-					uni.$emit('licenseData',this.licenseDate)
+				if (this.licenseDate) {
+					uni.$emit('licenseData', this.licenseDate)
+				}
+				this.appStoreBusinessLicenseDto = {
+					"address": this.licenseDate.site.words,
+					"businessLicense": this.licenseDate.business.words,
+					"businessScope": this.licenseDate.business.words,
+					"capital": this.licenseDate.registered.words,
+					"composing": this.licenseDate.certificate.words,
+					"createTime": "",
+					"creditCode": this.licenseDate.credit.words,
+					"identityNumber": this.licenseDate.credit.words,
+					"indate": this.licenseDate.validity.words,
+					"legalPerson": this.licenseDate.person.words,
+					"nameStatus": "",
+					"organization": this.licenseDate.company.words,
+					"recognition": "",
+					"registerDate": this.licenseDate.establishment.words,
+					"status": "",
+					"storeId": 0,
+					"type": this.licenseDate.site.words
 				}
-				uni.$emit('dataUrl',{licenseUrl:this.licenseUrl,storeUrl:this.storeUrl})
+				uni.$emit('dataUrl', {
+					licenseUrl: this.licenseUrl,
+					storeUrl: this.storeUrl,
+					appStoreBusinessLicenseDto: this.appStoreBusinessLicenseDto
+				})
 			},
 			getLicensedata(res, index, lists, name) {
 				if (res.statusCode == 200) {
 					this.$u.toast('上传成功');
-					this.showLicense=true
+					this.showLicense = true
 					uni.hideLoading();
 					this.licenseUrl = JSON.parse(res.data).data
 					request({
@@ -113,14 +138,15 @@
 						if (res.data.code == 0) {
 							this.$u.toast('识别成功');
 							this.licenseDate = res.data.data.wordsResultQuery
-							this.Analyse=res.data.msg
+							this.Analyse = res.data.msg
 						}
 						if (res.data.code == 500) {
 							this.$u.toast(res.data.msg);
-							this.Analyse=res.data.msg
+							this.Analyse = res.data.msg
 						}
 					}).catch(err => {
 						this.$u.toast('识别失败');
+						this.Analyse = "识别失败"
 					}).finally(() => {})
 				}
 			},
@@ -128,19 +154,18 @@
 				if (res.statusCode == 200) {
 					this.$u.toast('上传成功');
 					this.storeUrl = JSON.parse(res.data).data
-					this.showStore=true
+					this.showStore = true
 				}
 			},
-			cancelModal(){
-				uni.navigateBack({
-				})
+			cancelModal() {
+				uni.navigateBack({})
 			},
-			licenseRemove(){
-				this.showLicense=false
-				this.Analyse="正在识别,请稍等"
+			licenseRemove() {
+				this.showLicense = false
+				this.Analyse = "正在识别,请稍等"
 			},
-			storeRemove(){
-				this.showStore=false
+			storeRemove() {
+				this.showStore = false
 			}
 		},
 	}

+ 7 - 4
pages/login/register_3.vue

@@ -111,7 +111,7 @@
 				</view>
 			</u-form-item>
 		</u-form>
-		<view style="margin:0 30rpx;">
+		<view style="margin:0 30rpx 30rpx 30rpx">
 			<u-button @click="nextStep" type="primary" @tap="$u.debounce(submit, 2000,immediate = true)" :loading="loading"
 			 :ripple="true" ripple-bg-color="#99d4ff">确认注册</u-button>
 		</view>
@@ -149,7 +149,8 @@
 				querybrandList: [],
 				// brandList: [],
 				allbrandList: [], //弹出窗获取brand数组
-				checkedBrandlist: [] //选中brand组成一个新数组
+				checkedBrandlist: [], //选中brand组成一个新数组
+				appStoreBusinessLicenseDto:''
 			}
 		},
 		created() {
@@ -316,7 +317,6 @@
 						})
 					})
 					this.checkedAgentlist = this.agentList.filter(item => this.cooperations.indexOf(item.brand) > -1)
-					console.log(this.checkedAgentlist)
 					this.checkedBrandlist = this.checkedAgentlist.reduce((res, item, index, array) => {
 						res.push(item.brand)
 						return res;
@@ -364,6 +364,7 @@
 					return res;
 				}, []);
 				let data = {
+					"appStoreBusinessLicenseDto":this.dataUrl.appStoreBusinessLicenseDto,
 					"brandAgentLvQueryList": this.brandAgentLvQueryList,
 					"city": this.formData.city,
 					"contactName": this.formData.name,
@@ -400,7 +401,9 @@
 				}).catch(err => {
 					console.log(err)
 				}).finally(() => {
-					this.loading = false
+					setTimeout(() => {
+						this.loading = false
+					}, 2000)
 				})
 			}
 		},