xiatian 1 周之前
父节点
当前提交
e0890f85aa
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 0
      src/modules/portal/views/Access.vue
  2. 1 2
      src/modules/portal/views/home/Home.vue

+ 2 - 0
src/modules/portal/views/Access.vue

@@ -30,6 +30,7 @@ export default {
     this.accessInfo.timestamp = params.timestamp;
     this.accessInfo.timestamp = params.timestamp;
     this.accessInfo.token = params.token;
     this.accessInfo.token = params.token;
     this.accessInfo.from = params.from;
     this.accessInfo.from = params.from;
+    this.accessInfo.scode = params.scode;
 
 
     const url = CORE_API + "/auth/thirdPartyAccess";
     const url = CORE_API + "/auth/thirdPartyAccess";
     this.$httpWithMsg
     this.$httpWithMsg
@@ -39,6 +40,7 @@ export default {
       .then((response) => {
       .then((response) => {
         var user = response.data;
         var user = response.data;
         user.from = this.accessInfo.from;
         user.from = this.accessInfo.from;
+        user.scode = this.accessInfo.scode;
         this.USER_SIGNIN(user);
         this.USER_SIGNIN(user);
         this.$router.replace({ path: "/home/overview" });
         this.$router.replace({ path: "/home/overview" });
         this.$notify({
         this.$notify({

+ 1 - 2
src/modules/portal/views/home/Home.vue

@@ -348,9 +348,8 @@ export default {
     },
     },
     logout() {
     logout() {
       if ("cas" == this.user.from) {
       if ("cas" == this.user.from) {
-        var schoolCode = window.location.hostname.split(".")[0];
         this.$http
         this.$http
-          .get("/api/auth/logout/" + schoolCode)
+          .get("/api/auth/logout/" + this.user.scode)
           .then(() => {
           .then(() => {
             this.USER_SIGNOUT();
             this.USER_SIGNOUT();
           })
           })