Commit f691e18d by 莫晓莉

mxl

parent 9446e276
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</view> </view>
<view class="login-item bt"> <view class="login-item bt">
<image class="login-icon" src="../../../static/login/code.png"></image> <image class="login-icon" src="../../../static/login/code.png"></image>
<input v-model="loginForm.code" class="login-item-input" placeholder="请输入验证码" /> <input type="number" v-model="loginForm.code" class="login-item-input" placeholder="请输入验证码" />
<view class="code-btn" @click="codeInfo.clickType ? getCode() : ''">{{codeInfo.msg}}</view> <view class="code-btn" @click="codeInfo.clickType ? getCode() : ''">{{codeInfo.msg}}</view>
</view> </view>
<view class="login-item bt"> <view class="login-item bt">
...@@ -122,6 +122,16 @@ ...@@ -122,6 +122,16 @@
}); });
return; return;
} }
var myreg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
if (!myreg.test(this.loginForm.phone)) {
uni.showToast({
icon: 'none',
title: '请输入正确的手机号'
});
return;
}
if (this.loginForm.code==undefined) { if (this.loginForm.code==undefined) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment