|
|
|
@ -98,6 +98,7 @@ import { getTenantList } from '@/api/login';
|
|
|
|
import { dynamicClear, dynamicTenant } from '@/api/system/tenant';
|
|
|
|
import { dynamicClear, dynamicTenant } from '@/api/system/tenant';
|
|
|
|
import { TenantVO } from '@/api/types';
|
|
|
|
import { TenantVO } from '@/api/types';
|
|
|
|
import notice from './notice/index.vue';
|
|
|
|
import notice from './notice/index.vue';
|
|
|
|
|
|
|
|
import router from "@/router";
|
|
|
|
|
|
|
|
|
|
|
|
const appStore = useAppStore();
|
|
|
|
const appStore = useAppStore();
|
|
|
|
const userStore = useUserStore();
|
|
|
|
const userStore = useUserStore();
|
|
|
|
@ -163,8 +164,14 @@ const logout = async () => {
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
type: 'warning'
|
|
|
|
type: 'warning'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
await userStore.logout();
|
|
|
|
userStore.logout().then(() => {
|
|
|
|
location.href = import.meta.env.VITE_APP_CONTEXT_PATH + 'index';
|
|
|
|
router.replace({
|
|
|
|
|
|
|
|
path: '/login',
|
|
|
|
|
|
|
|
query: {
|
|
|
|
|
|
|
|
redirect: encodeURIComponent(router.currentRoute.value.fullPath || '/')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const emits = defineEmits(['setLayout']);
|
|
|
|
const emits = defineEmits(['setLayout']);
|
|
|
|
|