|
@@ -142,6 +142,7 @@ import qs from "qs";
|
|
|
import { API_CONFIG } from "@/common/apiConfig";
|
|
|
import "@/common/wxLogin";
|
|
|
import { getUser } from "@/api/user";
|
|
|
+import { loginOut } from '@/api/user';
|
|
|
|
|
|
export default {
|
|
|
name: "loginPage",
|
|
@@ -188,6 +189,7 @@ export default {
|
|
|
methods: {
|
|
|
...mapActions({
|
|
|
login: "user/login",
|
|
|
+ logout: 'user/logout'
|
|
|
}),
|
|
|
async loginFn() {
|
|
|
if (this.loading) return;
|
|
@@ -435,6 +437,8 @@ export default {
|
|
|
let _nowOrgId = this.OrgOptions.find((i) => i.Uorg == this.org).id;
|
|
|
if (!_list.includes(_nowOrgId)) {
|
|
|
this.wechatLogin();
|
|
|
+ await loginOut()
|
|
|
+ await this.logout();
|
|
|
return this.$message.error("该组织/学校不允许登录");
|
|
|
}
|
|
|
window.sessionStorage.setItem('org2',this.org2)
|