qukaidi 4 роки тому
батько
коміт
10a4c59fc9
3 змінених файлів з 63 додано та 35 видалено
  1. 1 1
      manifest.json
  2. 55 30
      pages/login/register.vue
  3. 7 4
      pages/login/register_3.vue

+ 1 - 1
manifest.json

@@ -2,7 +2,7 @@
     "name" : "耀灵全钢店管家",
     "appid" : "__UNI__0C3473D",
     "description" : "测试",
-    "versionName" : "0.0.0.0.0.8",
+    "versionName" : "0.0.0.0.0.9",
     "versionCode" : "100",
     "transformPx" : false,
     "app-plus" : {

+ 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)
 				})
 			}
 		},