فهرست منبع

修改禅道注册问题

qukaidi 4 سال پیش
والد
کامیت
f1b85d8d8d

+ 5 - 18
components/mi-map/mi-map.vue

@@ -42,11 +42,11 @@
 			},
 			positionIcon: {
 				type: String,
-				default: 'https://s2.ax1x.com/2020/03/10/8CvKmt.png'
+				default: '../../static/sailun/gps-icon.png'
 			},
 			myPositionIcon: {
 				type: String,
-				default: 'https://s2.ax1x.com/2020/03/10/8CjxSJ.png'
+				default: '../../static/sailun/8CjxSJ.png'
 			}
 		},
 		data() {
@@ -61,7 +61,6 @@
 					address: '请选择集合地点'
 				},
 				controls: [], // 地图中心点图标, 可更换iconPath, 详情见官方文档关于map组件的介绍
-
 			};
 		},
 		mounted() {
@@ -76,8 +75,8 @@
 					this.controls = [{
 						iconPath: this.positionIcon,
 						position: {
-							left: uni.getSystemInfoSync().screenWidth/2-15,
-							top: uni.getSystemInfoSync().screenHeight/2-225,
+							left: uni.getSystemInfoSync().windowWidth/2-15,
+							top: (uni.getSystemInfoSync().windowHeight-240)/2-15,
 							width: 30,
 							height: 30,
 						},
@@ -93,7 +92,6 @@
 					geocode: true,
 					success: function(res) {
 						this_.initMap(res)
-						console.log(res);
 					},
 					fail: function(e) {
 						uni.showToast({
@@ -123,7 +121,6 @@
 					latitude: res.latitude,
 					address: await this.getAddressName(res)
 				})
-				console.log('当前位置:' + res.latitude + '|' + res.longitude);
 			},
 
 			// 监听地图位置变化
@@ -136,7 +133,6 @@
 						that.mapCtx.getCenterLocation({
 							success: res => {
 								this.checkMap(res)
-								console.log(res);
 							},
 							fail: err => {
 								console.log(err);
@@ -190,12 +186,7 @@
 			},
 			// 计算地图的高度
 			initMapH() {
-				// #ifdef APP-PLUS
-				this.mapH = uni.getSystemInfoSync().windowHeight - 210;
-				// #endif
-				// // #ifndef APP-PLUS
-				// this.mapH = uni.getSystemInfoSync().windowHeight - 170;
-				// // #endif
+				this.mapH = uni.getSystemInfoSync().windowHeight-210;
 			},
 			// 移动到我的位置
 			toMyLocation() {
@@ -214,9 +205,6 @@
 
 <style lang="scss" scoped>
 	.server-place {
-		position: fixed;
-		left: 0;
-		top: 0;
 		height: 100vh;
 		width: 100%;
 		z-index: 999;
@@ -227,7 +215,6 @@
 			justify-content: center;
 			align-items: center;
 			flex-direction: column;
-
 			.my-location {
 				width: 700rpx;
 				height: 100rpx;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
components/mi-map/qqmap-wx-jssdk.min.js


+ 15 - 7
manifest.json

@@ -2,7 +2,7 @@
     "name" : "耀灵全钢店管家",
     "appid" : "__UNI__0C3473D",
     "description" : "测试",
-    "versionName" : "0.0.0.0.0.5",
+    "versionName" : "0.0.0.0.0.6",
     "versionCode" : "100",
     "transformPx" : false,
     "app-plus" : {
@@ -25,7 +25,8 @@
         "nvueCompiler" : "uni-app",
         "compilerVersion" : 3,
         "modules" : {
-            "Maps" : {}
+            "Maps" : {},
+            "Geolocation" : {}
         },
         "distribute" : {
             "android" : {
@@ -57,11 +58,11 @@
             },
             "ios" : {
                 "privacyDescription" : {
-                    "NSPhotoLibraryUsageDescription" : "注册时从相册中选择图片作为执照或者门头照",
-                    "NSPhotoLibraryAddUsageDescription" : "注册时从相册中选择图片作为执照或者门头照",
-                    "NSCameraUsageDescription" : "扫码出入库需要启动摄像头扫描二维码",
-                    "NSLocationWhenInUseUsageDescription" : "注册时需要地区定位,扫码是需要开启电子围栏",
-                    "NSLocationAlwaysAndWhenInUseUsageDescription" : "注册时需要地区定位,扫码是需要开启电子围栏"
+                    "NSPhotoLibraryUsageDescription" : "该应用需要读取你的相册,以便为你编辑门店信息",
+                    "NSPhotoLibraryAddUsageDescription" : "该应用需要读取你的相册,以便为你编辑门店信息",
+                    "NSCameraUsageDescription" : "该应用需要你的相机,以便你拍摄上传门店信息",
+                    "NSLocationWhenInUseUsageDescription" : "该应用需要你的地理位置,以便为你提供当前位置信息",
+                    "NSLocationAlwaysAndWhenInUseUsageDescription" : "该应用需要你的地理位置,以便为你提供当前位置信息"
                 }
             },
             "sdkConfigs" : {
@@ -71,6 +72,13 @@
                         "appkey_ios" : "KYoTmSbggKUatksUwZKXrFmZX9oiVBrR",
                         "appkey_android" : "4wYVsEvjrdDXtsbRYsNTy1f01PAYbZin"
                     }
+                },
+                "geolocation" : {
+                    "baidu" : {
+                        "__platform__" : [ "ios", "android" ],
+                        "appkey_ios" : "KYoTmSbggKUatksUwZKXrFmZX9oiVBrR",
+                        "appkey_android" : "4wYVsEvjrdDXtsbRYsNTy1f01PAYbZin"
+                    }
                 }
             },
             "icons" : {

+ 7 - 4
pages/login/index.vue

@@ -65,7 +65,8 @@
 				loading: false,
 				codeLoading: false,
 				SystemInfo: '',
-				networkType: ''
+				networkType: '',
+				version:''
 			}
 		},
 		computed: {
@@ -92,7 +93,10 @@
 						this.requestAndroidPermission()
 					}	
 				}
-			});		
+			});
+			plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
+				this.version=wgtinfo.version
+			})
 			uni.$on('loginphone',data=>{
 				this.tel=data
 			})
@@ -145,7 +149,7 @@
 							"osVersion": this.SystemInfo.system,
 							"phoneBrand": this.SystemInfo.brand,
 							"phoneModel": this.SystemInfo.model,
-							"appVersion": "1.00",
+							"appVersion": this.version,
 							"networkType": this.networkType,
 						}
 					}).then(res => {
@@ -185,7 +189,6 @@
 							"opreaType": "1"
 						},
 					}).then(res => {
-						console.log(res)
 						if (res.data.code == 0) {
 							if (this.$refs.uCode.canGetCode) {
 								this.$refs.uCode.start();

+ 1 - 1
pages/login/register.vue

@@ -28,7 +28,7 @@
 				</view>
 			</view>
 		</u-card>
-		<view style="color: #787878;margin-left: 40rpx;">
+		<view style="color: #787878;margin: 0 40rpx;">
 			注:请确保系统识别的营业执照名称和法人信息与营业执照上的信息保持一致
 		</view>
 		<view style="margin: 30rpx;">

+ 19 - 34
pages/login/register_2.vue

@@ -13,13 +13,18 @@
 						<view style="margin-right: 10rpx;">
 							<u-icon name="home" size="36"></u-icon>
 						</view>
+						<view style="margin-right: 10rpx;">门店名称</view>
 						<u-input v-model="form.store" placeholder="请输入门店名称" />
 					</u-form-item>
 					<u-form-item prop="company">
 						<view style="margin-right: 10rpx;">
 							<u-icon name="home" size="36"></u-icon>
 						</view>
+						<view style="margin-right: 10rpx;">公司名称</view>
 						<u-input v-model="form.company" placeholder="请输入公司名称" :disabled="true" />
+						<view style="font-size: 16rpx;color: red;">
+							不可修改
+						</view>
 					</u-form-item>
 					<u-form-item prop="name">
 						<view style="margin-right: 10rpx;">
@@ -42,16 +47,6 @@
 							<u-button size="mini" type="primary" @click="getCode" shape="circle" :loading="codeLoading">{{codeText}}</u-button>
 						</view>
 					</u-form-item>
-					<!-- 					<u-form-item prop="region">
-						<view style="margin-right: 10rpx;">
-							<u-icon name="map" size="36"></u-icon>
-						</view>
-						<u-input :select-open="pickerShow" v-model="form.region" placeholder="点击选择省市区" @click="pickerShow = true"
-						 :disabled="true"></u-input>
-						<view class="" slot="right">
-							<u-icon name="arrow-right" color="#666666" size="36"></u-icon>
-						</view>
-					</u-form-item> -->
 					<u-form-item prop="region">
 						<view style="margin-right: 10rpx;">
 							<u-icon name="map" size="36"></u-icon>
@@ -72,7 +67,6 @@
 					</u-form-item>
 				</u-form>
 				<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
-				<u-picker mode="region" v-model="pickerShow" @confirm="regionConfirm" :default-region="defaultRegion"></u-picker>
 			</view>
 		</u-card>
 		<view style="margin: 30rpx;">
@@ -91,8 +85,6 @@
 		data() {
 			return {
 				codeText: '',
-				pickerShow: false,
-				defaultRegion: [],
 				form: {
 					store: '',
 					company: '',
@@ -105,7 +97,7 @@
 					province: "",
 					city: "",
 					district: "",
-					addressInfo: "",
+					addressInfo: ""
 				},
 				rules: {
 					store: [{
@@ -114,7 +106,7 @@
 							trigger: 'blur,change'
 						},
 						{
-							pattern: /^[\u4e00-\u9fa5_a-zA-Z()()]+$/g,
+							pattern: /^[\u4e00-\u9fa5_a-zA-Z()()0-9]+$/g,
 							// 正则检验前先将值转为字符串
 							transform(value) {
 								return String(value);
@@ -135,17 +127,17 @@
 							trigger: 'blur,change'
 						}, {
 							min: 2,
-							max: 10,
-							message: '姓名长度在2到10个字符',
+							message: '姓名长度至少在2个字符以上',
 							trigger: ['change', 'blur'],
 						},
 						{
 							// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
-							validator: (rule, value, callback) => {
-								// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
-								return this.$u.test.chinese(value);
+							pattern: /^[\u4e00-\u9fa5_a-zA-Z ]+$/g,
+							// 正则检验前先将值转为字符串
+							transform(value) {
+								return String(value);
 							},
-							message: '姓名必须为中文',
+							message: '姓名必须为中文或英文',
 							// 触发器可以同时用blur和change,二者之间用英文逗号隔开
 							trigger: ['change', 'blur'],
 						}
@@ -196,7 +188,7 @@
 				dataUrl: "",
 				codeLoading: false,
 				modelshow: false,
-				modelcontent: "如果店名和联系人与营业执照不一致,请重新上传清晰度更高的营业执照"
+				modelcontent: "如果店名和联系人与营业执照不一致,请重新上传清晰度更高的营业执照"
 			};
 		},
 		created() {
@@ -226,11 +218,9 @@
 			uni.getSystemInfo({
 				success: res => {
 					this.SystemInfo = res
-					console.log(res)
 				}
 			});
 			if (this.SystemInfo.platform == 'ios') {
-				this.judgeIosPermission('location')
 				uni.showModal({
 					title: "温馨提示",
 					content: "如果店名和联系人与营业执照不一致,请重新上传清晰度更高的营业执照?",
@@ -238,8 +228,7 @@
 					showCancel: false
 				})
 			} else {
-				this.requestAndroidPermission('android.permission.ACCESS_FINE_LOCATION')
-				this.modelshow = true
+				this.modelshow= true
 			}
 		},
 		methods: {
@@ -274,7 +263,6 @@
 							"opreaType": "0"
 						},
 					}).then(res => {
-						console.log(res)
 						if (res.data.code == 0) {
 							if (this.$refs.uCode.canGetCode) {
 								this.$refs.uCode.start();
@@ -296,12 +284,6 @@
 				}
 
 			},
-			regionConfirm(e) {
-				// this.form.region = e.province.label + '-' + e.city.label + '-' + e.area.label;
-				// this.form.province = e.province.label;
-				// this.form.city = e.city.label;
-				// this.form.district = e.area.label;
-			},
 			inMap() {
 				this.$u.route({
 					url: 'pages/login/register_map'
@@ -315,5 +297,8 @@
 </script>
 
 <style lang="scss" scoped>
-
+	.label-style {
+		font-size: 10rpx;
+		color: #F2F2F2;
+	}
 </style>

+ 30 - 32
pages/login/register_3.vue

@@ -31,18 +31,13 @@
 				</view>
 				<u-line color="#e4e7ed"></u-line>
 				<view class="content">
-					<scroll-view scroll-y="true" style="height: 300rpx;">
-						<view class="u-flex u-row-center">
-							
-							<u-checkbox-group :wrap="true" @change="checkboxGroupChange" style="display: flex;justify-content: left">
-								<u-checkbox v-model="item.checked" v-for="(item, index) in allbrandList" :key="index" :name="item.brandCode" shape="circle">
-									<view class="u-flex u-row-left" style="width: 150rpx;">
-										{{item.brandCode}}
-									</view>
-								</u-checkbox>
-							</u-checkbox-group>
-						</view>
-					</scroll-view>
+					<u-checkbox-group :wrap="true" @change="checkboxGroupChange" style="display: flex;justify-content: left">
+						<u-checkbox v-model="item.checked" v-for="(item, index) in allbrandList" :key="index" :name="item.brandCode" shape="circle">
+							<view class="u-flex u-row-left" style="width: 150rpx;">
+								{{item.brandCode}}
+							</view>
+						</u-checkbox>
+					</u-checkbox-group>
 				</view>
 			</u-popup>
 			<u-card v-if="this.form.cooperation.length" :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)"
@@ -150,8 +145,9 @@
 				},
 				protocol: false,
 				querybrandList: [],
-				brandList: [],
-				allbrandList:[]
+				// brandList: [],
+				allbrandList:[],//弹出窗获取brand数组
+				checkedBrandlist:[]//选中brand组成一个新数组
 			}
 		},
 		created() {
@@ -188,7 +184,7 @@
 					if (res.data.code == 0) {
 						this.agentList = res.data.Data.data
 						this.agentList = this.agentList.reduce((res, item, index, array) => {
-							for (let i = 0; i < array[index].regionBrandList.length; ++i) {
+							for (let i = 0; i < array[index].regionBrandList.length;i++) {
 								res.push({
 									brand: array[index].regionBrandList[i],
 									brandCode: array[index].regionBrandList[i],
@@ -202,15 +198,15 @@
 							}
 							return res;
 						}, []);
-						this.brandList = [...new Set(this.agentList.reduce((res, item, index, array) => {
-							res.push(item.brand)
-							return res;
-						}, []))].reduce((res, item, index, array) => {
-							res.push({
-								brand: item
-							})
-							return res;
-						}, []);
+						// this.brandList = [...new Set(this.agentList.reduce((res, item, index, array) => {
+						// 	res.push(item.brand)
+						// 	return res;
+						// }, []))].reduce((res, item, index, array) => {
+						// 	res.push({
+						// 		brand: item
+						// 	})
+						// 	return res;
+						// }, []);
 					}
 					if (res.data.code == 500) {
 						this.$u.toast(res.data.msg);
@@ -248,7 +244,7 @@
 				}).then(res => {
 					if (res.data.code == 0) {
 						this.querybrandList = res.data.data
-					this.querybrandList = this.querybrandList.filter(item => this.cooperations.indexOf(item.brandCode) > -1)
+						this.querybrandList = this.querybrandList.filter(item => this.checkedBrandlist.indexOf(item.brandCode) > -1)
 					}
 					if (res.data.code == 500) {
 						this.$u.toast(res.data.msg);
@@ -266,7 +262,7 @@
 					data: {},
 				}).then(res => {
 					if (res.data.code == 0) {
-						res.data.data.map(function(item, index) {
+						res.data.data.map((item, index)=> {
 							item.checked = false;
 						})
 						this.tasknameList = res.data.data
@@ -304,12 +300,15 @@
 				if (this.cooperations != null) {
 					this.form.cooperation = this.cooperations.toString();
 					this.checkedAgentlist = this.agentList.filter(item => this.cooperations.indexOf(item.brand) > -1)
+					this.checkedBrandlist=this.checkedAgentlist.reduce((res, item, index, array) => {
+							res.push(item.brand)
+							return res;
+						}, []);
 					this.getQuerybrand()
 					this.brandShow = false
 				} else {
 					console.log("至少选择一项")
 				}
-
 			},
 			getTaskconfirm(e) {
 				this.form.tasklist = e[0].label;
@@ -321,10 +320,10 @@
 				this.$refs.uForm.validate(valid => {
 					if (valid) {
 						this.brandAgentLvQueryList=this.checkedAgentlist.filter(item => (item.disabledGroup!=true))
-						let checkenLength=this.checkedAgentlist.filter(item => (item.checked==true))
-						if(!checkenLength.length) return this.$u.toast('未正确选择经销商,请正确选择');
-						if(checkenLength.length<this.brandAgentLvQueryList.length) return this.$u.toast('请完善任务条数');
-						if (!this.protocol) return this.$u.toast('请勾选协议');
+						let checkenLength=this.checkedAgentlist.filter(item => (item.checked==false))
+						if(!this.brandAgentLvQueryList.length) return this.$u.toast('未正确选择经销商,请正确选择');
+						if(checkenLength.length!=0) return this.$u.toast('请选择'+checkenLength[0].brand+"品牌签约任务");
+						if (!this.protocol) return this.$u.toast('请阅读并同意用户协议和隐私协议');
 						this.setData()
 					} else {
 						console.log('验证失败');
@@ -369,7 +368,6 @@
 				}).then(res => {
 					if (res.data.code == 0) {
 						this.loading = true
-						this.$u.toast(res.data.msg);
 						setTimeout(() => {
 							this.$u.route({
 								url: 'pages/login/index',

+ 0 - 5
pages/login/register_map.vue

@@ -13,7 +13,6 @@
 		},
 		data() {
 			return {
-				// mapShow: false,
 				positionObj: {},
 			};
 		},
@@ -49,8 +48,4 @@
         align-items: center;
         justify-content: center;
     }
-
-    .address{
-        // margin-top: 1rem;
-    }
 </style>

BIN
static/sailun/8CjxSJ.png


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است