|
|
|
@ -100,13 +100,13 @@ const actions = {
|
|
|
|
|
}
|
|
|
|
|
return res;
|
|
|
|
|
},
|
|
|
|
|
logout: ({ commit }, returnUrl) => {
|
|
|
|
|
logout: async ({ commit }, returnUrl) => {
|
|
|
|
|
returnUrl = returnUrl || router.currentRoute.value.fullPath;
|
|
|
|
|
console.info('[logout]', returnUrl);
|
|
|
|
|
commit('local/setToken', null, { root: true });
|
|
|
|
|
commit('auth/setPermission', [], { root: true });
|
|
|
|
|
commit('layout/setReturnUrl', returnUrl, { root: true });
|
|
|
|
|
router.push({ name: 'Login', query: { returnUrl } });
|
|
|
|
|
await router.push({ name: 'Login', query: { returnUrl } });
|
|
|
|
|
location.reload();
|
|
|
|
|
},
|
|
|
|
|
getPermission: async ({ commit }) => {
|
|
|
|
|
let res = await getPermission();
|
|
|
|
|