短信验证码锁定6位长度,过滤空格
Showing
2 changed files
with
10 additions
and
1 deletions
... | @@ -320,7 +320,7 @@ export default { | ... | @@ -320,7 +320,7 @@ export default { |
320 | } | 320 | } |
321 | let data = { | 321 | let data = { |
322 | mobile: this.loginForm.userId, | 322 | mobile: this.loginForm.userId, |
323 | lan : this.locale | 323 | lan: this.locale |
324 | } | 324 | } |
325 | this._startTimeClick(); | 325 | this._startTimeClick(); |
326 | httpPost({ | 326 | httpPost({ |
... | @@ -691,6 +691,10 @@ export default { | ... | @@ -691,6 +691,10 @@ export default { |
691 | }, | 691 | }, |
692 | 'loginForm.otp': function () { | 692 | 'loginForm.otp': function () { |
693 | this.errorTips.oe2 = ""; | 693 | this.errorTips.oe2 = ""; |
694 | this.loginForm.otp = this.loginForm.otp.replace(/(^\s*)|(\s*$)/g, ""); | ||
695 | if (this.loginForm.otp.length > 0) { | ||
696 | this.loginForm.otp = this.loginForm.otp.substring(0, 6); | ||
697 | } | ||
694 | }, | 698 | }, |
695 | 'loginForm.imageValue': function () { | 699 | 'loginForm.imageValue': function () { |
696 | this.errorTips.oe3 = ""; | 700 | this.errorTips.oe3 = ""; | ... | ... |
... | @@ -687,6 +687,11 @@ export default { | ... | @@ -687,6 +687,11 @@ export default { |
687 | }, | 687 | }, |
688 | "registerForm.otp": function () { | 688 | "registerForm.otp": function () { |
689 | this.errorTips.p2 = ""; | 689 | this.errorTips.p2 = ""; |
690 | |||
691 | this.registerForm.otp = this.registerForm.otp.replace(/(^\s*)|(\s*$)/g, ""); | ||
692 | if (this.registerForm.otp.length > 0) { | ||
693 | this.registerForm.otp = this.registerForm.otp.substring(0, 6); | ||
694 | } | ||
690 | }, | 695 | }, |
691 | "registerForm.imageValue": function () { | 696 | "registerForm.imageValue": function () { |
692 | this.errorTips.p3 = ""; | 697 | this.errorTips.p3 = ""; | ... | ... |
-
Please register or sign in to post a comment