|
@@ -144,7 +144,6 @@
|
|
|
<div class="fa_i_item">
|
|
|
<span>随机码</span>
|
|
|
<div>
|
|
|
- <!-- @change="getOrgData" -->
|
|
|
<input
|
|
|
type="text"
|
|
|
placeholder="请输入"
|
|
@@ -302,9 +301,7 @@ import axios from "axios";
|
|
|
import qs from "qs";
|
|
|
import { API_CONFIG } from "@/common/apiConfig";
|
|
|
import "@/common/wxLogin";
|
|
|
-import { getUser } from "@/api/user";
|
|
|
-import { loginOut } from "@/api/user";
|
|
|
-import { GetSuffix } from "@/api/user";
|
|
|
+import { getUser, loginOut } from "@/api/user";
|
|
|
import { myMixin } from "@/mixins/mixin.js";
|
|
|
|
|
|
export default {
|
|
@@ -407,16 +404,45 @@ export default {
|
|
|
}),
|
|
|
// 获取组织后缀
|
|
|
async getSuffix() {
|
|
|
- let res = await GetSuffix({ mode: this.SuffixData });
|
|
|
- console.log("res.data[0]", res.data[0]);
|
|
|
|
|
|
- if (res.data[0].length && this.SuffixData) {
|
|
|
- this.orginfo = res.data[0];
|
|
|
- this.org = this.orginfo[0].mail;
|
|
|
- } else {
|
|
|
- this.orginfo = [];
|
|
|
- this.org = "";
|
|
|
- }
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ functionName: API_CONFIG.ajax_getliyuanCode.functionName,
|
|
|
+ mode: this.SuffixData
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ this.$ajax
|
|
|
+ .post(API_CONFIG.baseUrl, params)
|
|
|
+ .then((res) => {
|
|
|
+ let data = [...res.data[0], ...res.data[1]]
|
|
|
+ console.log('data',data);
|
|
|
+ if (data.length) {
|
|
|
+ this.orginfo = data;
|
|
|
+ this.org = this.orginfo[0].mail;
|
|
|
+ } else {
|
|
|
+ this.orginfo = [];
|
|
|
+ this.org = "";
|
|
|
+ }
|
|
|
+ resolve(1)
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ console.log(e);
|
|
|
+ reject(e)
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ // let res = await getliyuanCode({ mode: this.SuffixData });
|
|
|
+ // console.log("res.data", res.data);
|
|
|
+
|
|
|
+ // if (res.data[0].length && this.SuffixData) {
|
|
|
+ // this.orginfo = res.data[0];
|
|
|
+ // this.org = this.orginfo[0].mail;
|
|
|
+ // } else {
|
|
|
+ // this.orginfo = [];
|
|
|
+ // this.org = "";
|
|
|
+ // }
|
|
|
},
|
|
|
async loginFn() {
|
|
|
if (this.loading) return;
|
|
@@ -443,7 +469,6 @@ export default {
|
|
|
// 荔园平台登录账号进行判断
|
|
|
if (this.allowOrgList.findIndex((i) => i.area) != -1) {
|
|
|
let _index = this.allowOrgList.findIndex((i) => i.area);
|
|
|
- // console.log('kkkkkkkkkkk');
|
|
|
let _list = this.allowOrgList[_index].list;
|
|
|
if (
|
|
|
this.OrgOptions.find((i) => i.Uorg == this.org) &&
|
|
@@ -452,7 +477,6 @@ export default {
|
|
|
return this.$message.error("账号不可登录,请使用您的专属网址");
|
|
|
}
|
|
|
} else {
|
|
|
- // console.log('this.org',this.org);
|
|
|
|
|
|
let mergedList = this.allowOrgList.reduce((acc, curr) => {
|
|
|
return [...acc, ...curr.list];
|
|
@@ -831,9 +855,10 @@ export default {
|
|
|
)
|
|
|
) {
|
|
|
this.wechatLogin();
|
|
|
+ this.$message.error("账号不可登录,请使用您的专属网址");
|
|
|
await loginOut();
|
|
|
await this.logout();
|
|
|
- return this.$message.error("账号不可登陆,请联系管理员。");
|
|
|
+ return
|
|
|
}
|
|
|
} else {
|
|
|
let mergedList = this.allowOrgList.reduce((acc, curr) => {
|
|
@@ -845,9 +870,10 @@ export default {
|
|
|
)
|
|
|
) {
|
|
|
this.wechatLogin();
|
|
|
+ this.$message.error("账号不可登录,请使用您的专属网址");
|
|
|
await loginOut();
|
|
|
await this.logout();
|
|
|
- return this.$message.error("账号不可登陆,请联系管理员。");
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
let userjson = await getUser({ userid: _data.userid });
|
|
@@ -890,7 +916,7 @@ export default {
|
|
|
this.loading = false;
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
- console.log(err.response);
|
|
|
+ console.log('错误信息',err.response);
|
|
|
if (err && err.response && err.response.status === 401) {
|
|
|
this.loginType = "bind";
|
|
|
}
|
|
@@ -906,6 +932,10 @@ export default {
|
|
|
},
|
|
|
// 随机码登录
|
|
|
nextSteps() {
|
|
|
+ if (!this.SuffixData) {
|
|
|
+ this.$message.error(this.prefixL == 'liyuan_' ? "请选择校区" : '请输入随机码');
|
|
|
+ return;
|
|
|
+ }
|
|
|
let reg = /^\d+$/;
|
|
|
if (!reg.test(this.icode)) {
|
|
|
this.$message.error("请正确填写随机码");
|