Browse Source

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

tong 4 năm trước cách đây
mục cha
commit
11fb2c41e6

+ 8 - 18
common/locales/en.js

@@ -1,21 +1,11 @@
 export default {
-	// 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分
-	components: {
-		desc: 'Numerous components cover the various requirements of the development process, and the components are rich in functions and compatible with multiple terminals. Let you integrate quickly, out of the box'
-	},
-	js: {
-		desc: 'Numerous intimate gadgets are a weapon that you can call upon during the development process, allowing you to dart in your hand and pierce the Yang with a hundred steps'
-	},
-	template: {
-		desc: 'Collection of many commonly used pages and layouts, reducing the repetitive work of developers, allowing you to focus on logic and get twice the result with half the effort'
-	},
-	nav: {
-		components: 'Components',
-		js: 'JS',
-		template: 'Template'
-	},
-	common: {
-		intro: 'UI framework for rapid development of multiple platforms',
-		title: 'uView UI',
+	login:{
+		code:"Click for authentication code",
+		login:"Login",
+		sign:"Sign up now",
+		no:"No account?",
+		Lan:"Switch language—English",
+		mobile:"Enter mobile number",
+		code:"Enter verification code",
 	},
 }

+ 29 - 18
common/locales/zh.js

@@ -1,21 +1,32 @@
 export default {
-	// 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分
-	components: {
-		desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用'
-	},
-	js: {
-		desc: '众多的贴心小工具,是你开发过程中召之即来的利器,让你飞镖在手,百步穿杨'
-	},
-	template: {
-		desc: '收集众多的常用页面和布局,减少开发者的重复工作,让你专注逻辑,事半功倍'
-	},
-	nav: {
-		components: '组件',
-		js: '工具',
-		template: '模板'
-	},
-	common: {
-		intro: '多平台快速开发的UI框架',
-		title: 'uView UI',
+	login:{
+		code:"获取验证码",
+		login:"登录",
+		sign:"立即注册",
+		no:"还没有账号?",
+		Lan:"切换语言—中文",
+		mobile:"请输入手机号",
+		code:"请输入验证码"
 	},
+	//扫码页面
+	scanenter:{
+		title:'扫码入库',
+		tips:'提示',
+		tips_s:'胎号',
+		input:'手动录入',
+		number:'胎号',
+		Specifications:'规格',
+		operation:'操作',
+		slide:'没有更多啦',
+		confirm:'扫码确认',
+		pleaseenter:'请输入胎号',
+		pleaseenter_s:'请输入轮胎胎号',
+		nodata:'请扫码或录入后再点击!',
+		networkstate:'无网络,请连接网络后再试~',
+		networkstate_s:'网络繁忙请稍后再试',
+		locationstate:'获取地址失败, 请检查是否开启定位权限~',
+		repeat:'请勿重复录入',
+		inputsuccess:'录入成功',
+		scansuccess:'扫码成功'
+	}
 }

+ 2 - 2
components/luo-version-upgrade/luo-version-upgrade.vue

@@ -9,10 +9,10 @@
 				<text class="content-text">{{describe}}</text>
 				<view class="versionUpgradeViewIs_force0" v-if="is_force==false&&start==false">
 					<text class="text butClose" @click="close">下次在说</text>
-					<text class="text download"  @tap="$u.throttle(downUpdate, 15000)">立即更新</text>
+					<text class="text download"  @tap="$u.throttle(downUpdate, 2500)">立即更新</text>
 				</view>
 				<view class="versionUpgradeViewIs_force0" v-if="is_force==true&&start==false">
-					<text class="downloadIs_force1" @tap="$u.throttle(downUpdate, 15000)">立即更新</text>
+					<text class="downloadIs_force1" @tap="$u.throttle(downUpdate, 2500)">立即更新</text>
 				</view>
 				<view class="versionUpgradeViewStartTrue" v-if="start!=false">
 					<text class="title">下载进度</text>

+ 1 - 1
manifest.json

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

+ 191 - 210
pages/home/scancode/index.vue

@@ -47,29 +47,7 @@
 		<view>
 		</view>
 		<u-toast ref="repeat" position="bottom" />
-		<u-popup mode="bottom" v-model="show_s" :mask-close-able="false" :safe-area-inset-bottom="true">
-			<view class="confrim-btn">
-				<u-button @click="show_s = false;" style="float: left;border: none;" :hair-line="false" :plain="false">取消</u-button>
-				<u-button @click="container" style="float: right;border: none;" :hair-line="false" :plain="false">确定</u-button>
-			</view>
-			<view class="content_s">
-				<scroll-view scroll-y="true" style="height: 200rpx;">
-					{{regular}}
-				</scroll-view>
-			</view>
-		</u-popup>
-		<u-popup mode="bottom" v-model="show_d" :mask-close-able="false" :safe-area-inset-bottom="true">
-			<view class="confrim-btn">
-				<u-button @click="show_d = false;" style="float: left;border: none;" :hair-line="false" :plain="false">取消</u-button>
-				<u-button @click="container_s" style="float: right;border: none;" :hair-line="false" :plain="false">确定</u-button>
-			</view>
-			<view class="content_s">
-				<scroll-view scroll-y="true" style="height: 200rpx;">
-					{{regular}}
-				</scroll-view>
-			</view>
-		</u-popup>
-	</view>
+		</view>
 </template>
 
 <script>
@@ -90,7 +68,7 @@
 				content: '请输入轮胎胎号',
 				number_s: '',
 				number_a: '',
-				regular: '轮胎非正规是否入库',
+				// regular: '轮胎非正规是否入库',
 				lisi: [],
 				background: {
 					backgroundColor: '#0094fe',
@@ -157,6 +135,10 @@
 			this.mounteds()
 		},
 		methods: {
+			switchLang() {
+							// 切换为英文
+							this.$i18n.locale = 'en';
+						},
 			mounteds() {
 				let that = this
 				uni.getLocation({
@@ -169,7 +151,7 @@
 					fail: function(e) {
 						uni.showToast({
 							icon: 'none',
-							title: '获取地址失败, 请检查是否开启定位权限~~'
+							title: '获取地址失败, 请检查是否开启定位权限~'
 						})
 					}
 				})
@@ -228,95 +210,105 @@
 			//手动录入调用
 			manualentry() {
 				if (this.number_a.length != 0) {
-					request({
-							url: '/storeScan/storeScanGetTyre',
-							method: 'Post',
-							data: {
-								storeId: this.$store.state.storeInfo.storeId,
-								userId: this.$store.state.storeInfo.userId,
-								tyreNum: this.number_a,
-								scanType: 1,
-								scanWay: 0,
-								longitude: this.degree.x,
-								latitude: this.degree.y,
-								scanAddress: this.address
-							}
-						}).then(res => {
-							console.log(res)
-							if (res.data.code == 513) {
-								console.log(res.data.msg)
-								let name = 'regular'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 514) {
-								console.log(res.data.msg)
-								let name = 'nonoperating'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 515) {
-								console.log(res.data.msg)
-								let name = 'warehousing'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 517) {
-								console.log(res.data.msg)
-								let name = 'atypism'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 518) {
-								console.log(res.data.msg)
-								let name = 'gobeyond'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 519) {
-								console.log(res.data.msg)
-								let name = 'notallow'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 500) {
-								console.log(res.data.msg)
-								let name = 'error'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 0) {
+					console.log(this.degree)
+					if (this.degree == undefined) {
+						uni.showToast({
+							icon: 'none',
+							title: '获取地址失败, 请检查是否开启定位权限~~',
+							position: "bottom"
+						})
+						return
+					}else{
+						request({
+								url: '/storeScan/storeScanGetTyre',
+								method: 'Post',
+								data: {
+									storeId: this.$store.state.storeInfo.storeId,
+									userId: this.$store.state.storeInfo.userId,
+									tyreNum: this.number_a,
+									scanType: 1,
+									scanWay: 0,
+									longitude: this.degree.x,
+									latitude: this.degree.y,
+									scanAddress: this.address
+								}
+							}).then(res => {
 								console.log(res)
-								this.res = res
-								console.log(res.data.data[0].isRegular)
-								for (let i = 0; i < this.lisi.length; i++) {
-									if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
-										console.log(res)
-										let err = {
-											"data": {
-												"msg": "请勿重复录入",
+								if (res.data.code == 513) {
+									console.log(res.data.msg)
+									let name = 'regular'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 514) {
+									console.log(res.data.msg)
+									let name = 'nonoperating'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 515) {
+									console.log(res.data.msg)
+									let name = 'warehousing'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 517) {
+									console.log(res.data.msg)
+									let name = 'atypism'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 518) {
+									console.log(res.data.msg)
+									let name = 'gobeyond'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 519) {
+									console.log(res.data.msg)
+									let name = 'notallow'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 500) {
+									console.log(res.data.msg)
+									let name = 'error'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 0) {
+									console.log(res)
+									this.res = res
+									console.log(res.data.data[0].isRegular)
+									for (let i = 0; i < this.lisi.length; i++) {
+										if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
+											console.log(res)
+											let err = {
+												"data": {
+													"msg": "请勿重复录入",
+												}
 											}
+											console.log(err.data.msg)
+											let name = 'duplicateentry'
+											this.tipss(err, name)
+											return
 										}
-										console.log(err.data.msg)
-										let name = 'duplicateentry'
-										this.tipss(err, name)
-										return
 									}
+									this.container()
 								}
-								this.container()
-							}
-							console.log(this.lisi)
-						}).catch(err => {
-							// this.$refs.repeat.show({
-							// 	title: "网络繁忙,请稍后再试",
-							// 	type: 'default',
-							// 	position: 'bottom'
-							// })
-							console.log(err)
-						})
-						.finally(() => {
-							// Loading.close()
-						})
+								console.log(this.lisi)
+							}).catch(err => {
+								// this.$refs.repeat.show({
+								// 	title: "网络繁忙,请稍后再试",
+								// 	type: 'default',
+								// 	position: 'bottom'
+								// })
+								console.log(err)
+							})
+							.finally(() => {
+								// Loading.close()
+							})
+					}
 				} else {
 					this.$refs.repeat.show({
 						title: '请输入胎号',
@@ -407,119 +399,108 @@
 						}
 					}
 				});
-				let datats = {
-							storeId: this.$store.state.storeInfo.storeId,
-							userId: this.$store.state.storeInfo.userId,
-							tyreNum: this.number_s,
-							scanType: 1,
-							scanWay: 1,
-							longitude: this.degree.x,
-							latitude: this.degree.y,
-							scanAddress: this.address
-						}
-						console.log(datats)
 				console.log(val)
 				this.number = val
 				this.number_s = val
-				request({
-						url: '/storeScan/storeScanGetTyre',
-						method: 'Post',
-						data: {
-							storeId: this.$store.state.storeInfo.storeId,
-							userId: this.$store.state.storeInfo.userId,
-							tyreNum: this.number_s,
-							scanType: 1,
-							scanWay: 1,
-							longitude: this.degree.x,
-							latitude: this.degree.y,
-							scanAddress: this.address
-						}
-					}).then(res => {
-						this.res_s = res
-						this.tips = "胎号"
-						if (res.data.code == 513) {
-							console.log(res.data.msg)
-							let name = 'regular'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 514) {
-							console.log(res.data.msg)
-							let name = 'nonoperating'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 515) {
-							console.log(res.data.msg)
-							let name = 'warehousing'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 517) {
-							console.log(res.data.msg)
-							let name = 'atypism'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 518) {
-							console.log(res.data.msg)
-							let name = 'gobeyond'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 519) {
-							console.log(res.data.msg)
-							let name = 'notallow'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 500) {
-							console.log(res.data.msg)
-							let name = 'error'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 0) {
+				if (this.degree == undefined) {
+					uni.showToast({
+						icon: 'none',
+						title: '获取地址失败, 请检查是否开启定位权限~~',
+						position: "bottom"
+					})
+					return
+				}else{
+					request({
+							url: '/storeScan/storeScanGetTyre',
+							method: 'Post',
+							data: {
+								storeId: this.$store.state.storeInfo.storeId,
+								userId: this.$store.state.storeInfo.userId,
+								tyreNum: val,
+								scanType: 1,
+								scanWay: 0,
+								longitude: this.degree.x,
+								latitude: this.degree.y,
+								scanAddress: this.address
+							}
+						}).then(res => {
 							console.log(res)
-							this.res = res
-							console.log(res.data.data[0].isRegular)
-							for (let i = 0; i < this.lisi.length; i++) {
-								if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
-									console.log(res)
-									let err = {
-										"data": {
-											"msg": "请勿重复扫码",
+							this.tips = "胎号"
+							if (res.data.code == 513) {
+								console.log(res.data.msg)
+								let name = 'regular'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 514) {
+								console.log(res.data.msg)
+								let name = 'nonoperating'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 515) {
+								console.log(res.data.msg)
+								let name = 'warehousing'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 517) {
+								console.log(res.data.msg)
+								let name = 'atypism'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 518) {
+								console.log(res.data.msg)
+								let name = 'gobeyond'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 519) {
+								console.log(res.data.msg)
+								let name = 'notallow'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 500) {
+								console.log(res.data.msg)
+								let name = 'error'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 0) {
+								console.log(res)
+								this.res = res
+								console.log(res.data.data[0].isRegular)
+								for (let i = 0; i < this.lisi.length; i++) {
+									if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
+										console.log(res)
+										let err = {
+											"data": {
+												"msg": "请勿重复录入",
+											}
 										}
+										console.log(err.data.msg)
+										let name = 'duplicateentry'
+										this.tipss(err, name)
+										return
 									}
-									console.log(err.data.msg)
-									let name = 'repeatcode'
-									this.tipss(err, name)
-									return
 								}
+								this.container()
 							}
-							this.container_s()
-						}
-						// console.log(this.lisi)
-					}).catch(err => {
-						if (err.code == 400) {//谁给我删了......
-							this.$refs.repeat.show({
-								title: "无网络",
-								type: 'default',
-								position: 'bottom'
-							})
-						} else {
+							console.log(this.lisi)
+						}).catch(err => {
 							this.$refs.repeat.show({
-								title: "请重新扫码",
+								title: "网络繁忙,请稍后再试",
 								type: 'default',
 								position: 'bottom'
 							})
-							this.repeated()
-						}
-						console.log(err)
-					})
-					.finally(() => {
-						// Loading.close()
-					})
+							console.log(err)
+						})
+						.finally(() => {
+							// Loading.close()
+						})
+				}
 			},
 			container_s() {
 				this.show_d = false

+ 201 - 182
pages/home/scancode/scancodeout.vue

@@ -153,7 +153,7 @@
 			});
 			this.coord = ''
 		},
-		onShow(){
+		onShow() {
 			this.mounteds()
 		},
 		methods: {
@@ -198,12 +198,12 @@
 						}).then(res => {
 							console.log(res.data.data.result)
 							console.log(res.data)
-							if(res.data.code != 0){
+							if (res.data.code != 0) {
 								uni.showToast({
 									icon: 'none',
 									title: '获取定位失败,请稍后再试~'
 								})
-							}else{
+							} else {
 								this_.baidu = res.data.data.result
 								this_.addreev(this_.baidu, aress)
 							}
@@ -228,95 +228,105 @@
 			//手动录入调用
 			manualentry() {
 				if (this.number_a.length != 0) {
-					request({
-							url: '/storeScan/storeScanGetTyre',
-							method: 'Post',
-							data: {
-								storeId: this.$store.state.storeInfo.storeId,
-								userId: this.$store.state.storeInfo.userId,
-								tyreNum: this.number_a,
-								scanType: 2,
-								scanWay: 0,
-								longitude: this.degree.x,
-								latitude: this.degree.y,
-								scanAddress: this.address
-							}
-						}).then(res => {
-							console.log(res)
-							if (res.data.code == 513) {
-								console.log(res.data.msg)
-								let name = 'regular'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 514) {
-								console.log(res.data.msg)
-								let name = 'nonoperating'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 515) {
-								console.log(res.data.msg)
-								let name = 'warehousing'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 517) {
-								console.log(res.data.msg)
-								let name = 'atypism'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 518) {
-								console.log(res.data.msg)
-								let name = 'gobeyond'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 519) {
-								console.log(res.data.msg)
-								let name = 'notallow'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 500) {
-								console.log(res.data.msg)
-								let name = 'error'
-								this.tipss(res, name)
-								return
-							}
-							if (res.data.code == 0) {
+					console.log(this.degree)
+					if (this.degree == undefined) {
+						uni.showToast({
+							icon: 'none',
+							title: '获取地址失败, 请检查是否开启定位权限~~',
+							position: "bottom"
+						})
+						return
+					} else {
+						request({
+								url: '/storeScan/storeScanGetTyre',
+								method: 'Post',
+								data: {
+									storeId: this.$store.state.storeInfo.storeId,
+									userId: this.$store.state.storeInfo.userId,
+									tyreNum: this.number_a,
+									scanType: 2,
+									scanWay: 0,
+									longitude: this.degree.x,
+									latitude: this.degree.y,
+									scanAddress: this.address
+								}
+							}).then(res => {
 								console.log(res)
-								this.res = res
-								console.log(res.data.data[0].isRegular)
-								for (let i = 0; i < this.lisi.length; i++) {
-									if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
-										console.log(res)
-										let err = {
-											"data": {
-												"msg": "请勿重复录入",
+								if (res.data.code == 513) {
+									console.log(res.data.msg)
+									let name = 'regular'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 514) {
+									console.log(res.data.msg)
+									let name = 'nonoperating'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 515) {
+									console.log(res.data.msg)
+									let name = 'warehousing'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 517) {
+									console.log(res.data.msg)
+									let name = 'atypism'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 518) {
+									console.log(res.data.msg)
+									let name = 'gobeyond'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 519) {
+									console.log(res.data.msg)
+									let name = 'notallow'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 500) {
+									console.log(res.data.msg)
+									let name = 'error'
+									this.tipss(res, name)
+									return
+								}
+								if (res.data.code == 0) {
+									console.log(res)
+									this.res = res
+									console.log(res.data.data[0].isRegular)
+									for (let i = 0; i < this.lisi.length; i++) {
+										if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
+											console.log(res)
+											let err = {
+												"data": {
+													"msg": "请勿重复录入",
+												}
 											}
+											console.log(err.data.msg)
+											let name = 'duplicateentry'
+											this.tipss(err, name)
+											return
 										}
-										console.log(err.data.msg)
-										let name = 'duplicateentry'
-										this.tipss(err, name)
-										return
 									}
+									this.container()
 								}
-								this.container()
-							}
-							console.log(this.lisi)
-						}).catch(err => {
-							// this.$refs.repeat.show({
-							// 	title: "网络繁忙,请稍后再试",
-							// 	type: 'default',
-							// 	position: 'bottom'
-							// })
-							console.log(err)
-						})
-						.finally(() => {
-							// Loading.close()
-						})
+								console.log(this.lisi)
+							}).catch(err => {
+								// this.$refs.repeat.show({
+								// 	title: "网络繁忙,请稍后再试",
+								// 	type: 'default',
+								// 	position: 'bottom'
+								// })
+								console.log(err)
+							})
+							.finally(() => {
+								// Loading.close()
+							})
+					}
 				} else {
 					this.$refs.repeat.show({
 						title: '请输入胎号',
@@ -410,105 +420,114 @@
 				console.log(val)
 				this.number = val
 				this.number_s = val
-				request({
-						url: '/storeScan/storeScanGetTyre',
-						method: 'Post',
-						data: {
-							storeId: this.$store.state.storeInfo.storeId,
-							userId: this.$store.state.storeInfo.userId,
-							tyreNum: this.number_s,
-							scanType: 2,
-							scanWay: 1,
-							longitude: this.degree.x,
-							latitude: this.degree.y,
-							scanAddress: this.address
-						}
-					}).then(res => {
-						this.res_s = res
-						this.tips = "胎号"
-						if (res.data.code == 513) {
-							console.log(res.data.msg)
-							let name = 'regular'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 514) {
-							console.log(res.data.msg)
-							let name = 'nonoperating'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 515) {
-							console.log(res.data.msg)
-							let name = 'warehousing'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 517) {
-							console.log(res.data.msg)
-							let name = 'atypism'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 518) {
-							console.log(res.data.msg)
-							let name = 'gobeyond'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 519) {
-							console.log(res.data.msg)
-							let name = 'notallow'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 500) {
-							console.log(res.data.msg)
-							let name = 'error'
-							this.tipss(res, name)
-							return
-						}
-						if (res.data.code == 0) {
-							console.log(res)
-							this.res = res
-							console.log(res.data.data[0].isRegular)
-							for (let i = 0; i < this.lisi.length; i++) {
-								if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
-									console.log(res)
-									let err = {
-										"data": {
-											"msg": "请勿重复扫码",
+				if (this.degree == undefined) {
+					uni.showToast({
+						icon: 'none',
+						title: '获取地址失败, 请检查是否开启定位权限~~',
+						position: "bottom"
+					})
+					return
+				} else {
+					request({
+							url: '/storeScan/storeScanGetTyre',
+							method: 'Post',
+							data: {
+								storeId: this.$store.state.storeInfo.storeId,
+								userId: this.$store.state.storeInfo.userId,
+								tyreNum: val,
+								scanType: 2,
+								scanWay: 1,
+								longitude: this.degree.x,
+								latitude: this.degree.y,
+								scanAddress: this.address
+							}
+						}).then(res => {
+							this.res_s = res
+							this.tips = "胎号"
+							if (res.data.code == 513) {
+								console.log(res.data.msg)
+								let name = 'regular'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 514) {
+								console.log(res.data.msg)
+								let name = 'nonoperating'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 515) {
+								console.log(res.data.msg)
+								let name = 'warehousing'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 517) {
+								console.log(res.data.msg)
+								let name = 'atypism'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 518) {
+								console.log(res.data.msg)
+								let name = 'gobeyond'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 519) {
+								console.log(res.data.msg)
+								let name = 'notallow'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 500) {
+								console.log(res.data.msg)
+								let name = 'error'
+								this.tipss(res, name)
+								return
+							}
+							if (res.data.code == 0) {
+								console.log(res)
+								this.res = res
+								console.log(res.data.data[0].isRegular)
+								for (let i = 0; i < this.lisi.length; i++) {
+									if (this.lisi[i].tireNumber == res.data.data[0].tirenumber) {
+										console.log(res)
+										let err = {
+											"data": {
+												"msg": "请勿重复扫码",
+											}
 										}
+										console.log(err.data.msg)
+										let name = 'repeatcode'
+										this.tipss(err, name)
+										return
 									}
-									console.log(err.data.msg)
-									let name = 'repeatcode'
-									this.tipss(err, name)
-									return
 								}
+								this.container_s()
 							}
-							this.container_s()
-						}
-						// console.log(this.lisi)
-					}).catch(err => {
-						if (err.code == 400) { //谁给我删了......
-							this.$refs.repeat.show({
-								title: "无网络",
-								type: 'default',
-								position: 'bottom'
-							})
-						} else {
-							this.$refs.repeat.show({
-								title: "请重新扫码",
-								type: 'default',
-								position: 'bottom'
-							})
-							this.repeated()
-						}
-						console.log(err)
-					})
-					.finally(() => {
-						// Loading.close()
-					})
+							// console.log(this.lisi)
+						}).catch(err => {
+							if (err.code == 400) { //谁给我删了......
+								this.$refs.repeat.show({
+									title: "无网络",
+									type: 'default',
+									position: 'bottom'
+								})
+							} else {
+								this.$refs.repeat.show({
+									title: "请重新扫码",
+									type: 'default',
+									position: 'bottom'
+								})
+								this.repeated()
+							}
+							console.log(err)
+						})
+						.finally(() => {
+							// Loading.close()
+						})
+				}
 			},
 			container_s() {
 				this.show_d = false

+ 56 - 43
pages/login/index.vue

@@ -9,28 +9,32 @@
 			 border-radius="20" margin="50rpx">
 				<view slot="body">
 					<view style="margin-top: 20rpx;">
-						<u-field v-model="tel" placeholder="请填写手机号" label-width="50">
+						<u-field v-model="tel" :placeholder="$t('login.mobile')" label-width="50">
 							<u-icon slot="icon" name="account" size="36" color="#666666"></u-icon>
 						</u-field>
 					</view>
 					<view style="margin-top: 30rpx;">
-						<u-field v-model="code" placeholder="请填写验证码" label-width="50">
+						<u-field v-model="code" :placeholder="$t('login.code')" label-width="50">
 							<u-icon slot="icon" name="lock" size="36" color="#666666"></u-icon>
-							<u-button size="mini" slot="right" type="primary" @click="getCode" shape="circle" :loading="codeLoading">{{codeText}}</u-button>
+							<u-button v-if="send!='zh'" size="mini" slot="right" type="primary" @click="getCode" shape="circle" :loading="codeLoading">{{codeText}}</u-button>
+							<u-button v-else size="mini" slot="right" type="primary" @click="getCode" shape="circle" :loading="codeLoading">{{codeText}}</u-button>
 						</u-field>
 					</view>
-					<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
+					<view class="" v-if="send!='zh'">
+						<u-verification-code  ref="uCode" @change="codeChange"></u-verification-code>
+					</view>
+					<u-verification-code v-else ref="uCode" @change="codeChange" start-text="Send" change-text="Reacquire in X S" end-text="Reacquire"></u-verification-code>
 					<view style="margin-top: 80rpx;">
 						<u-button type="primary" :ripple="true" ripple-bg-color="#99d4ff" shape="circle" @tap="$u.debounce(submit, 2000,immediate = true)"
-						 :loading="loading">登录</u-button>
+						 :loading="loading">{{$t("login.login")}}</u-button>
 					</view>
 					<view style="margin-top: 80rpx;display: flex;justify-content: center;">
 						<view class="u-flex" @click="inregister">
 							<view style="color: rgba(0,160,234,0.5)">
-								还没有账号?
+								{{$t("login.no")}}
 							</view>
 							<view style="color: #00A0EA">
-								立即注册
+								{{$t("login.sign")}}
 							</view>
 						</view>
 					</view>
@@ -39,7 +43,7 @@
 		</view>
 		<view class="foot">
 			<view class="u-flex u-row-center u-col-center">
-				<u-divider color="#0095FF" border-color="#0095FF" bg-color="#F4F4F4" fontSize="30">赛轮店管家</u-divider>
+				<u-divider color="#0095FF" border-color="#0095FF" bg-color="#F4F4F4" fontSize="30" @click="switchLang">{{$t("login.Lan")}}</u-divider>
 			</view>
 		</view>
 	</view>
@@ -60,13 +64,14 @@
 			return {
 				tel: '',
 				code: '',
-				codeText: '',
+				codeText:"",
 				pact: false,
 				loading: false,
 				codeLoading: false,
 				SystemInfo: '',
 				networkType: '',
-				version:''
+				version: '',
+				send:'',
 			}
 		},
 		computed: {
@@ -85,27 +90,31 @@
 			});
 			// #ifdef APP-PLUS
 			uni.getLocation({
-			    success:res=>{
-			    },
-				fail:err=>{
-					if(this.SystemInfo.platform=="ios"){
+				success: res => {},
+				fail: err => {
+					if (this.SystemInfo.platform == "ios") {
 						this.judgeIosPermission()
-					}else{
+					} else {
 						this.requestAndroidPermission()
-					}	
+					}
 				}
 			});
 			// #endif
 			// #ifdef APP-PLUS
 			plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
-				this.version=wgtinfo.version
+				this.version = wgtinfo.version
 			})
 			// #endif
-			uni.$on('loginphone',data=>{
-				this.tel=data
+			uni.$on('loginphone', data => {
+				this.tel = data
 			})
 		},
 		methods: {
+			switchLang() {
+				this.$i18n.locale = this.$i18n.locale == 'en' ? 'zh' : 'en';
+				this.send= this.$i18n.locale == 'en' ? 'zh' : 'en';
+				console.log(this.send)
+			},
 			...mapMutations(['login']),
 			judgeIosPermission() {
 				let result = permision.judgeIosPermission('location')
@@ -158,6 +167,7 @@
 						}
 					}).then(res => {
 						if (res.data.code == 0) {
+							console.log(res.data.data)
 							this.toUser(res.data.data)
 							uni.$emit('login', {
 								msg: '登录成功'
@@ -183,31 +193,31 @@
 				this.codeText = text;
 			},
 			getCode() {
-				if (this.tel) {
-					this.codeLoading = true
-					request({
-						url: '/sailun/appStoreBasicInfo/sendCode',
-						method: 'post',
-						data: {
-							"phoneNumber": this.tel,
-							"opreaType": "1"
-						},
-					}).then(res => {
-						if (res.data.code == 0) {
-							if (this.$refs.uCode.canGetCode) {
+				if (this.$u.test.mobile(this.tel)) {
+					if (this.$refs.uCode.canGetCode) {
+						this.codeLoading = true
+						request({
+							url: '/sailun/appStoreBasicInfo/sendCode',
+							method: 'post',
+							data: {
+								"phoneNumber": this.tel,
+								"opreaType": "1"
+							},
+						}).then(res => {
+							if (res.data.code == 0) {
 								this.$refs.uCode.start();
-							} else {
-								this.$u.toast('倒计时结束后再发送');
 							}
-						}
-						if (res.data.code == 500) {
-							this.$u.toast(res.data.msg);
-						}
-					}).catch(err => {
-						console.log(err)
-					}).finally(() => {
-						this.codeLoading = false
-					})
+							if (res.data.code == 500) {
+								this.$u.toast(res.data.msg);
+							}
+						}).catch(err => {
+							console.log(err)
+						}).finally(() => {
+							this.codeLoading = false
+						})
+					} else {
+						this.$u.toast('倒计时结束后再发送');
+					}
 				} else {
 					this.$u.toast('请输入手机号');
 				}
@@ -226,12 +236,15 @@
 
 	.content {
 		position: relative;
-		top: -350rpx;
+		top: -400rpx;
 	}
 
 	.foot {
 		position: fixed;
 		bottom: 10rpx;
 		width: 100%;
+		padding-bottom: 0;  
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
 	}
 </style>

+ 24 - 24
pages/login/register_2.vue

@@ -279,32 +279,32 @@
 				this.codeText = text;
 			},
 			getCode() {
-				if (this.form.phone) {
-					this.codeLoading = true
-					request({
-						url: '/sailun/appStoreBasicInfo/sendCode',
-						method: 'post',
-						data: {
-							"phoneNumber": parseInt(this.form.phone),
-							"opreaType": "0"
-						},
-					}).then(res => {
-						if (res.data.code == 0) {
-							if (this.$refs.uCode.canGetCode) {
+				if (this.$u.test.mobile(this.form.phone)) {
+					if (this.$refs.uCode.canGetCode) {
+						this.codeLoading = true
+						request({
+							url: '/sailun/appStoreBasicInfo/sendCode',
+							method: 'post',
+							data: {
+								"phoneNumber": parseInt(this.form.phone),
+								"opreaType": "0"
+							},
+						}).then(res => {
+							if (res.data.code == 0) {
 								this.$refs.uCode.start();
-							} else {
-								this.$u.toast('倒计时结束后再发送');
 							}
-						}
-						if (res.data.code == 500) {
-							this.$u.toast(res.data.msg);
-						}
-					}).catch(err => {
-						console.log(err)
-					}).finally(() => {
-						this.codeLoading = false
-						// 通知验证码组件内部开始倒计时
-					})
+							if (res.data.code == 500) {
+								this.$u.toast(res.data.msg);
+							}
+						}).catch(err => {
+							console.log(err)
+						}).finally(() => {
+							this.codeLoading = false
+							// 通知验证码组件内部开始倒计时
+						})
+					} else {
+						this.$u.toast('倒计时结束后再发送');
+					}
 				} else {
 					this.$u.toast('请输入手机号');
 				}

+ 3 - 0
pages/login/register_3.vue

@@ -320,6 +320,9 @@
 						res.push(item.brand)
 						return res;
 					}, []);
+					this.checkedAgentlist.sort((a, b) => {
+						return a['brand'].localeCompare(b['brand'])
+					})
 					this.getQuerybrand()
 					this.brandShow = false
 				} else {