xiatian 1 week ago
parent
commit
e0890f85aa
2 changed files with 3 additions and 2 deletions
  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.token = params.token;
     this.accessInfo.from = params.from;
+    this.accessInfo.scode = params.scode;
 
     const url = CORE_API + "/auth/thirdPartyAccess";
     this.$httpWithMsg
@@ -39,6 +40,7 @@ export default {
       .then((response) => {
         var user = response.data;
         user.from = this.accessInfo.from;
+        user.scode = this.accessInfo.scode;
         this.USER_SIGNIN(user);
         this.$router.replace({ path: "/home/overview" });
         this.$notify({

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

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