|  | @@ -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: '登录成功'
 | 
	
	
		
			
				|  | @@ -187,24 +197,24 @@
 | 
	
		
			
				|  |  |  					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();
 | 
	
		
			
				|  |  | -								}
 | 
	
		
			
				|  |  | -								if (res.data.code == 500) {
 | 
	
		
			
				|  |  | -									this.$u.toast(res.data.msg);
 | 
	
		
			
				|  |  | -								}
 | 
	
		
			
				|  |  | -							}).catch(err => {
 | 
	
		
			
				|  |  | -								console.log(err)
 | 
	
		
			
				|  |  | -							}).finally(() => {
 | 
	
		
			
				|  |  | -								this.codeLoading = false
 | 
	
		
			
				|  |  | -							})
 | 
	
		
			
				|  |  | +							url: '/sailun/appStoreBasicInfo/sendCode',
 | 
	
		
			
				|  |  | +							method: 'post',
 | 
	
		
			
				|  |  | +							data: {
 | 
	
		
			
				|  |  | +								"phoneNumber": this.tel,
 | 
	
		
			
				|  |  | +								"opreaType": "1"
 | 
	
		
			
				|  |  | +							},
 | 
	
		
			
				|  |  | +						}).then(res => {
 | 
	
		
			
				|  |  | +							if (res.data.code == 0) {
 | 
	
		
			
				|  |  | +								this.$refs.uCode.start();
 | 
	
		
			
				|  |  | +							}
 | 
	
		
			
				|  |  | +							if (res.data.code == 500) {
 | 
	
		
			
				|  |  | +								this.$u.toast(res.data.msg);
 | 
	
		
			
				|  |  | +							}
 | 
	
		
			
				|  |  | +						}).catch(err => {
 | 
	
		
			
				|  |  | +							console.log(err)
 | 
	
		
			
				|  |  | +						}).finally(() => {
 | 
	
		
			
				|  |  | +							this.codeLoading = false
 | 
	
		
			
				|  |  | +						})
 | 
	
		
			
				|  |  |  					} 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>
 |