|
@@ -10,12 +10,12 @@
|
10
|
10
|
<el-input
|
11
|
11
|
placeholder="请填写手机号码"
|
12
|
12
|
prefix-icon="el-icon-mobile"
|
13
|
|
- v-model="LoginForm.tel"
|
|
13
|
+ v-model.trim="LoginForm.tel"
|
14
|
14
|
clearable
|
15
|
|
- v-on:blur="watchNum"
|
16
|
|
- v-on:input="watchNum"
|
17
|
15
|
maxlength="11"
|
18
|
16
|
@input="change(LoginForm.tel)"
|
|
17
|
+ v-on:blur="watchNum"
|
|
18
|
+ v-on:input="watchNum"
|
19
|
19
|
></el-input>
|
20
|
20
|
</el-form-item>
|
21
|
21
|
<el-form-item>
|
|
@@ -23,7 +23,7 @@
|
23
|
23
|
class="noRight"
|
24
|
24
|
placeholder="请填写密码"
|
25
|
25
|
prefix-icon="el-icon-lock"
|
26
|
|
- v-model="LoginForm.psd"
|
|
26
|
+ v-model.trim="LoginForm.psd"
|
27
|
27
|
show-password
|
28
|
28
|
clearable
|
29
|
29
|
v-on:blur="watchNum"
|
|
@@ -137,27 +137,34 @@ export default {
|
137
|
137
|
this.LoginForm.tel = val.replace(/[^0-9]+/g, "");
|
138
|
138
|
},
|
139
|
139
|
watchNum() {
|
140
|
|
- if (
|
141
|
|
- this.LoginForm.tel === "" ||
|
142
|
|
- this.LoginForm.psd === "" ||
|
143
|
|
- this.checked == false
|
144
|
|
- ) {
|
145
|
|
- this.loginshow = false;
|
146
|
|
- this.loginshowtwo = true;
|
147
|
|
- } else {
|
|
140
|
+ // if (
|
|
141
|
+ // this.LoginForm.tel === "" ||
|
|
142
|
+ // this.LoginForm.psd === "" ||
|
|
143
|
+ // this.checked == false
|
|
144
|
+ // ) {
|
|
145
|
+ // this.loginshow = false;
|
|
146
|
+ // this.loginshowtwo = true;
|
|
147
|
+ // } else {
|
|
148
|
+ // this.loginshow = true;
|
|
149
|
+ // this.loginshowtwo = false;
|
|
150
|
+ // }
|
|
151
|
+ // if (this.LoginForm.psd.length < 6) {
|
|
152
|
+ // this.loginshow = false;
|
|
153
|
+ // this.loginshowtwo = true;
|
|
154
|
+ // }
|
|
155
|
+ // if (this.LoginForm.psd.length > 6) {
|
|
156
|
+ // this.loginshow = true;
|
|
157
|
+ // this.loginshowtwo = false;
|
|
158
|
+ // }
|
|
159
|
+ // if (this.LoginForm.tel.length < 11) {
|
|
160
|
+ // this.loginshow = false;
|
|
161
|
+ // this.loginshowtwo = true;
|
|
162
|
+ // }
|
|
163
|
+ if(this.LoginForm.psd.length >= 6 && this.LoginForm.tel.length == 11 && this.checked == true){
|
148
|
164
|
this.loginshow = true;
|
149
|
165
|
this.loginshowtwo = false;
|
150
|
|
- }
|
151
|
|
- if (this.LoginForm.psd.length < 6) {
|
152
|
|
- this.loginshow = false;
|
153
|
|
- this.loginshowtwo = true;
|
154
|
|
- }
|
155
|
|
- if (this.LoginForm.psd.length > 6) {
|
156
|
|
- this.loginshow = true;
|
157
|
|
- this.loginshowtwo = false;
|
158
|
|
- }
|
159
|
|
- if (this.LoginForm.tel.length < 11) {
|
160
|
|
- this.loginshow = false;
|
|
166
|
+ }else{
|
|
167
|
+ this.loginshow = false;
|
161
|
168
|
this.loginshowtwo = true;
|
162
|
169
|
}
|
163
|
170
|
},
|
|
@@ -290,7 +297,7 @@ export default {
|
290
|
297
|
LoginForm:{
|
291
|
298
|
handler: function(obj) {
|
292
|
299
|
//do something
|
293
|
|
- if(obj.tel != '' && obj.psd){
|
|
300
|
+ if(obj.tel.length == 11 && obj.psd.length >= 6){
|
294
|
301
|
this.loginshow = true
|
295
|
302
|
this.loginshowtwo = false
|
296
|
303
|
}
|