fix: 修复邮箱大写报错的问题
This commit is contained in:
parent
10ff02b8a0
commit
af8344c555
2
resources/assets/js/functions/common.js
vendored
2
resources/assets/js/functions/common.js
vendored
@ -360,7 +360,7 @@
|
||||
* @returns {boolean}
|
||||
*/
|
||||
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',
|
||||
loginJump: false,
|
||||
|
||||
email: $A.getStorageString("cacheLoginEmail") || '',
|
||||
password: '',
|
||||
password2: '',
|
||||
@ -277,6 +278,12 @@ export default {
|
||||
|
||||
onLogin() {
|
||||
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)) {
|
||||
$A.messageWarning("请输入正确的邮箱地址");
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user