|
@@ -266,10 +266,9 @@ export default {
|
|
|
},
|
|
|
async loginFn() {
|
|
|
if (this.loading) return;
|
|
|
- if (this.loginType != 'orgL') {
|
|
|
- await this.getOrgData();
|
|
|
+ if (this.loginType != 'orgL') {
|
|
|
+ if (await this.getOrgData() == 2) return this.loginType = 'orgL'
|
|
|
}
|
|
|
-
|
|
|
const regEmail = new RegExp(
|
|
|
"^[A-Za-z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$"
|
|
|
);
|
|
@@ -290,18 +289,19 @@ export default {
|
|
|
) {
|
|
|
return this.$message.error("账号不可登录,请使用您的专属网址");
|
|
|
}
|
|
|
- } else {
|
|
|
- let mergedList = this.allowOrgList.reduce((acc, curr) => {
|
|
|
- return [...acc, ...curr.list];
|
|
|
- }, []);
|
|
|
- if (
|
|
|
- mergedList.includes(
|
|
|
- this.OrgOptions.find((i) => i.Uorg == this.org).id
|
|
|
- )
|
|
|
- ) {
|
|
|
- return this.$message.error("账号不可登录,请使用您的专属网址");
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ // else {
|
|
|
+ // let mergedList = this.allowOrgList.reduce((acc, curr) => {
|
|
|
+ // return [...acc, ...curr.list];
|
|
|
+ // }, []);
|
|
|
+ // if (
|
|
|
+ // mergedList.includes(
|
|
|
+ // this.OrgOptions.find((i) => i.Uorg == this.org).id
|
|
|
+ // )
|
|
|
+ // ) {
|
|
|
+ // return this.$message.error("账号不可登录,请使用您的专属网址");
|
|
|
+ // }
|
|
|
+ // }
|
|
|
let str = this.account.replace(/(^\s*)|(\s*$)/g, "");
|
|
|
if (!this.org && !regEmail.test(str)) {
|
|
|
// this.$message.error(
|
|
@@ -494,12 +494,8 @@ export default {
|
|
|
}else{
|
|
|
// // admin走这里
|
|
|
console.log('2222');
|
|
|
- if (this.allowOrgList.findIndex((i) => i.area) != -1) {
|
|
|
- this.$message.error("请输入账号后缀");
|
|
|
- }else{
|
|
|
- this.$message.error("该账号须使用“组织号登陆”");
|
|
|
- this.loginType = 'orgL'
|
|
|
- }
|
|
|
+ this.$message.error("该账号须使用“组织号登陆”");
|
|
|
+ return resolve(2);
|
|
|
|
|
|
// let mergedList = this.allowOrgList.reduce((acc, curr) => {
|
|
|
// return [...acc, ...curr.list];
|
|
@@ -515,7 +511,7 @@ export default {
|
|
|
// this.org = this.OrgOptions[0].Uorg;
|
|
|
}
|
|
|
}
|
|
|
- resolve();
|
|
|
+ return resolve(1);
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|