Explorar o código

修改注册提示

qukaidi %!s(int64=4) %!d(string=hai) anos
pai
achega
e6f64a00d0

+ 2 - 2
components/mi-map/mi-map.vue

@@ -4,8 +4,8 @@
 		 :controls='controls' scale="18" @regionchange='mapChange'>
 		</map>
 		<view class="map-tools">
-			<view class="my-location" @tap="toMyLocation">
-				<image class="left" :src="myPositionIcon" mode=""></image>
+			<view class="my-location">
+				<image class="left" :src="myPositionIcon" mode="" @tap="toMyLocation"></image>
 				<view class="right">
 					<text class="title">我的位置</text>
 					<text class="text">{{myAddress}}</text>

+ 39 - 6
pages/login/register.vue

@@ -9,7 +9,7 @@
 			</view>
 			<view slot="body">
 				<u-upload :custom-btn="true" max-count="1" class="u-flex u-row-center" :action="action" :form-data="licensepicType"
-				 @on-change="getLicensedata">
+				 @on-change="getLicensedata" @on-remove="licenseRemove">
 					<view slot="addBtn" hover-class="slot-btn__hover" hover-stay-time="150">
 						<u-image width="475rpx" height="303rpx" src="../../static/sailun/upload_preview.png"></u-image>
 					</view>
@@ -18,7 +18,7 @@
 					点击上传营业执照
 				</view>
 				<u-upload :custom-btn="true" max-count="1" class="u-flex u-row-center" :action="action" :form-data="storepicType"
-				 @on-change="getStoredata">
+				 @on-change="getStoredata" @on-remove="storeRemove">
 					<view slot="addBtn" hover-class="slot-btn__hover" hover-stay-time="150">
 						<u-image width="475rpx" height="303rpx" src="../../static/sailun/upload_preview.png"></u-image>
 					</view>
@@ -57,14 +57,38 @@
 				showLicense:false,
 				showStore:false,
 				modalShow:false,
-				storecontent:"此操作需要上传正规的营业执照照片,并确保系统识别出来的信息与营业执照一致,是否同意?"
+				storecontent:"此操作需要上传正规的营业执照照片,并确保系统识别出来的信息与营业执照一致,是否同意?",
+				Analyse:"正在识别,请稍等"
 			};
 		},
-		mounted() {
-			this.modalShow=true
+		created() {
+			uni.getSystemInfo({
+			    success:res=>{
+					this.SystemInfo=res
+			    }
+			});
+			if(this.SystemInfo.platform=='ios'){
+				uni.showModal({
+					title: "温馨提示",
+					content: "此操作需要上传正规的营业执照照片,并确保系统识别出来的信息与营业执照一致,是否同意?",
+					cancelText: "不同意",
+					confirmText: "同意",
+					success:res=> {
+						if (res.cancel) {
+							uni.navigateBack({})
+						}
+					}
+				})
+			}else{
+				this.modalShow=true
+			}
 		},
 		methods: {
 			nextStep() {
+				if(this.Analyse!="success"){
+					this.$u.toast(this.Analyse);
+					return
+				}
 				this.$u.route({
 					url: 'pages/login/register_2',
 				})
@@ -76,6 +100,7 @@
 			getLicensedata(res, index, lists, name) {
 				if (res.statusCode == 200) {
 					this.$u.toast('上传成功');
+					this.showLicense=true
 					uni.hideLoading();
 					this.licenseUrl = JSON.parse(res.data).data
 					request({
@@ -88,10 +113,11 @@
 						if (res.data.code == 0) {
 							this.$u.toast('识别成功');
 							this.licenseDate = res.data.data.wordsResultQuery
-							this.showLicense=true
+							this.Analyse=res.data.msg
 						}
 						if (res.data.code == 500) {
 							this.$u.toast(res.data.msg);
+							this.Analyse=res.data.msg
 						}
 					}).catch(err => {
 						this.$u.toast('识别失败');
@@ -108,6 +134,13 @@
 			cancelModal(){
 				uni.navigateBack({
 				})
+			},
+			licenseRemove(){
+				this.showLicense=false
+				this.Analyse="正在识别,请稍等"
+			},
+			storeRemove(){
+				this.showStore=false
 			}
 		},
 	}

+ 8 - 1
pages/login/register_2.vue

@@ -165,10 +165,17 @@
 			});
 			if(this.SystemInfo.platform=='ios'){
 				this.judgeIosPermission('location')
+				uni.showModal({
+					title: "温馨提示",
+					content: "如果店名和联系人与营业执照不一致,请重新上传清晰度更高的营业执照?",
+					confirmText: "确认",
+					showCancel:false
+				})
 			}else{
 				this.requestAndroidPermission('android.permission.ACCESS_FINE_LOCATION')
+				this.modelshow=true
 			}
-			this.modelshow=true
+			
 		},
 		methods: {
 			judgeIosPermission(permisionID) {

+ 52 - 17
pages/login/register_3.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<u-form :model="form">
+		<u-form :model="form" ref="uForm">
 			<u-card :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
 				<view slot="head">
 					<view class="u-flex">
@@ -51,12 +51,9 @@
 						已选合作品牌
 					</view>
 				</view>
-				<view slot="body">
-					<view class="u-flex u-flex-wrap u-row-around">
-						<u-image width="40%" height="100rpx" src="../../static/sailun/anyu.png" style="margin:10rpx;"></u-image>
-						<u-image width="40%" height="100rpx" src="../../static/sailun/anyu.png" style="margin:10rpx;"></u-image>
-						<u-image width="40%" height="100rpx" src="../../static/sailun/anyu.png" style="margin:10rpx;"></u-image>
-						<u-image width="40%" height="100rpx" src="../../static/sailun/anyu.png" style="margin:10rpx;"></u-image>
+				<view slot="body" style="display:flex;width:100%;flex-flow: wrap;justify-content: space-around;">
+					<view v-for="(item,index) in querybrandList" :key="index" style="width: 250rpx;">
+						<u-image width="250rpx" :src="item.logUrl" mode="widthFix"></u-image>
 					</view>
 				</view>
 			</u-card>
@@ -77,7 +74,7 @@
 							{{item.name}}
 						</view>
 					</u-form-item>
-					<u-form-item prop="tasklist">
+					<u-form-item prop="taskNum">
 						<view style="margin-right: 10rpx;">
 							<u-icon name="order" size="36"></u-icon>
 						</view>
@@ -90,11 +87,10 @@
 				</view>
 
 			</u-card>
-
-			<u-form-item prop="protocol" :border-bottom="false">
+			<u-form-item :border-bottom="false">
 				<view style="margin:0 30rpx;">
 					<u-checkbox-group>
-						<u-checkbox v-model="form.protocol">同意《用户协议》及《隐私政策》</u-checkbox>
+						<u-checkbox v-model="protocol">同意《用户协议》及《隐私政策》</u-checkbox>
 					</u-checkbox-group>
 				</view>
 			</u-form-item>
@@ -118,7 +114,6 @@
 				loading: false,
 				form: {
 					cooperation: '',
-					protocol: false,
 				},
 				formData: '',
 				dataUrl: '',
@@ -126,17 +121,25 @@
 				checkedAgentlist: [],
 				taskList: [],
 				tasknameList: [],
-				brandAgentLvQueryList: []
+				brandAgentLvQueryList: [],
+				rules: {
+					cooperation: [{
+						required: true,
+						message: '请选择品牌',
+						trigger: 'blur,change'
+					}]
+				},
+				protocol: false,
+				querybrandList:[]
 			}
 		},
 		created() {
 			uni.$on('formData', (data) => {
-				this.formData =data.formData
-				this.dataUrl=data.dataUrl
+				this.formData = data.formData
+				this.dataUrl = data.dataUrl
 			})
-		},
-		mounted() {
 			this.getAgentArea()
+			this.getQuerybrand()
 			this.getTasknum()
 		},
 		methods: {
@@ -148,6 +151,9 @@
 						"area": this.formData.district,
 						"city": this.formData.city,
 						"province": this.formData.province,
+						// "area": "市北区",
+						// "city": "青岛市",
+						// "province": "山东省",
 						"spart": "10",
 						"vkorg": "8100",
 						"vtweg": "10"
@@ -182,6 +188,24 @@
 
 				})
 			},
+			getQuerybrand(){
+				request({
+					url: '/sailun/appStoreBasicInfo/queryBrand',
+					method: 'get',
+					data: {},
+				}).then(res => {
+					if (res.data.code == 0) {
+					this.querybrandList=res.data.data
+					}
+					if (res.data.code == 500) {
+						this.$u.toast(res.data.msg);
+					}
+				}).catch(err => {
+					console.log(err)
+				}).finally(() => {
+				
+				})
+			},
 			getTasknum() {
 				request({
 					url: '/sailun/appStoreBasicInfo/enum',
@@ -224,6 +248,14 @@
 				this.form.tasklist = e[0].label;
 			},
 			submit() {
+				this.$refs.uForm.validate(valid => {
+					if (valid) {
+						if(!this.protocol)return this.$u.toast('请勾选协议');
+						console.log('验证通过');
+					} else {
+						console.log('验证失败');
+					}
+				});
 				this.brandAgentLvQueryList = this.checkedAgentlist.reduce((res, item) => {
 					res.push({
 						agent_id: item.agent_id,
@@ -279,6 +311,9 @@
 					this.loading = false
 				})
 			},
+		},
+		onReady() {
+			this.$refs.uForm.setRules(this.rules);
 		}
 	}
 </script>