|
@@ -3,6 +3,7 @@ import { isURL, validatenull } from '@/util/validate'
|
|
import { getUserInfo, loginByMobile, loginBySocial, loginByUsername, logout, refreshToken } from '@/api/login'
|
|
import { getUserInfo, loginByMobile, loginBySocial, loginByUsername, logout, refreshToken } from '@/api/login'
|
|
import { deepClone, encryption } from '@/util/util'
|
|
import { deepClone, encryption } from '@/util/util'
|
|
import webiste from '@/const/website'
|
|
import webiste from '@/const/website'
|
|
|
|
+import { resetRouter } from '@/router/router'
|
|
import { GetMenu } from '@/api/admin/menu'
|
|
import { GetMenu } from '@/api/admin/menu'
|
|
|
|
|
|
function addPath (ele, first) {
|
|
function addPath (ele, first) {
|
|
@@ -129,6 +130,7 @@ const user = {
|
|
LogOut ({ commit }) {
|
|
LogOut ({ commit }) {
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
logout().then(() => {
|
|
logout().then(() => {
|
|
|
|
+ resetRouter();
|
|
commit('SET_MENU', [])
|
|
commit('SET_MENU', [])
|
|
commit('SET_PERMISSIONS', [])
|
|
commit('SET_PERMISSIONS', [])
|
|
commit('SET_USER_INFO', {})
|
|
commit('SET_USER_INFO', {})
|
|
@@ -147,6 +149,7 @@ const user = {
|
|
// 注销session
|
|
// 注销session
|
|
FedLogOut ({ commit }) {
|
|
FedLogOut ({ commit }) {
|
|
return new Promise(resolve => {
|
|
return new Promise(resolve => {
|
|
|
|
+ resetRouter();
|
|
commit('SET_MENU', [])
|
|
commit('SET_MENU', [])
|
|
commit('SET_PERMISSIONS', [])
|
|
commit('SET_PERMISSIONS', [])
|
|
commit('SET_USER_INFO', {})
|
|
commit('SET_USER_INFO', {})
|