gcz 4 anos atrás
pai
commit
9b52023b3e
1 arquivos alterados com 7 adições e 2 exclusões
  1. 7 2
      pages/center/phoneLogin/phoneLogin.vue

+ 7 - 2
pages/center/phoneLogin/phoneLogin.vue

@@ -3,16 +3,17 @@
 		<view class="content">
 			<view class="title">手机号登录</view>
 			<input class="u-border-bottom" type="number" maxlength="11" v-model="tel" placeholder="请输入手机号" />
+			<view class="u-text-center u-type-error u-m-t-20" v-if="telError">手机号输入错误</view>
 			<button @tap="submit" :style="[inputStyle]" class="getCaptcha">获取短信验证码</button>
 			<u-message-input v-if="show" :focus="true" :value="messageCode" @change="change" @finish="finish" mode="bottomLine" :maxlength="codelength"></u-message-input>
 		</view>
-		<!-- <text v-if="messageError">验证码错误,请重新输入</text> -->
+		<!-- <view class="u-text-center u-type-error" v-if="phoneError">手机号输入错误</view> -->
 		<view class="captcha">
 			<!-- <text v-if="show&&this.messageDisable==false" @tap="noCaptcha">收不到验证码点这里</text> -->
 			<text v-if="messageShow">{{ second }}秒后可重新获取验证码</text>
 		</view>
 		<view class="buttom">
-			<view class="hint">
+			<view class="hint u-text-center">
 				登录代表同意
 				<text class="link">隐私政策,</text>
 				并授权使用您的账号信息(如昵称、头像、收货地址)以便您统一管理
@@ -38,6 +39,7 @@ export default {
 			toastType:'',
 			accessToken:'',
 			userId:'',
+			telError:false,
 			// messageError:false
 		}
 	},
@@ -50,7 +52,10 @@ export default {
 			if(this.tel.length==11&&this.messageDisable==false&&this.$u.test.mobile(this.tel)) {
 				style.color = "#fff";
 				style.backgroundColor = '#5295F5';
+				this.telError = false;
 				// style.backgroundColor = this.$u.color['warning'];
+			}else if(this.tel.length==11&&!this.$u.test.mobile(this.tel)){
+				this.telError = true;
 			}
 			return style;
 		}