庞利祥 5 năm trước cách đây
mục cha
commit
11af1306b8
2 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 5 1
      src/api/framework.js
  2. 1 0
      src/framework/layout/PageHeader.vue

+ 5 - 1
src/api/framework.js

@@ -100,7 +100,11 @@ export default {
 
     toLogout() {
         // TODO
-        router.push('/login')
+        router.push('/auth')
+        store.commit('setSsoToken', null)
+        let ssoServer = process.env.SSO_SERVER
+        let redirectUrl = window.location.protocol + '//' + window.location.host + '/'
+        window.location.href = `${ssoServer}/logout?redirectUrl=${redirectUrl}`
     },
 
     toLoginPage: toLogin

+ 1 - 0
src/framework/layout/PageHeader.vue

@@ -57,6 +57,7 @@ export default {
         userMenuCommand(cmd) {
             // console.log('userMenuCommand ', cmd)
             if (cmd == 'logout') {
+                console.log("点击登出l")
                 frameworkApi.toLogout()
             }
         },