fix: 修复邮箱大写报错的问题
This commit is contained in:
parent
10ff02b8a0
commit
af8344c555
@ -360,7 +360,7 @@
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
isEmail(email) {
|
isEmail(email) {
|
||||||
return /^[a-z0-9][a-z\.0-9-_]+@[a-z0-9_-]+(?:\.[a-z]{0,3}\.[a-z]{0,2}|\.[a-z]{0,3}|\.[a-z]{0,2})$/.test(email);
|
return /^[a-z0-9][a-z\.0-9-_]+@[a-z0-9_-]+(?:\.[a-z]{0,3}\.[a-z]{0,2}|\.[a-z]{0,3}|\.[a-z]{0,2})$/i.test(email);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,6 +81,7 @@ export default {
|
|||||||
|
|
||||||
loginType: 'login',
|
loginType: 'login',
|
||||||
loginJump: false,
|
loginJump: false,
|
||||||
|
|
||||||
email: $A.getStorageString("cacheLoginEmail") || '',
|
email: $A.getStorageString("cacheLoginEmail") || '',
|
||||||
password: '',
|
password: '',
|
||||||
password2: '',
|
password2: '',
|
||||||
@ -277,6 +278,12 @@ export default {
|
|||||||
|
|
||||||
onLogin() {
|
onLogin() {
|
||||||
this.chackServerUrl(true).then(() => {
|
this.chackServerUrl(true).then(() => {
|
||||||
|
this.email = $A.trim(this.email)
|
||||||
|
this.password = $A.trim(this.password)
|
||||||
|
this.password2 = $A.trim(this.password2)
|
||||||
|
this.code = $A.trim(this.code)
|
||||||
|
this.invite = $A.trim(this.invite)
|
||||||
|
//
|
||||||
if (!$A.isEmail(this.email)) {
|
if (!$A.isEmail(this.email)) {
|
||||||
$A.messageWarning("请输入正确的邮箱地址");
|
$A.messageWarning("请输入正确的邮箱地址");
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user