feat: 用户登录使用mock api, 可以使用test用户登录 (#233)

* feat: 用户登录使用mock api, 可以使用test用户登录

* Update permission.ts
This commit is contained in:
tomoat
2022-04-07 22:47:33 +08:00
committed by GitHub
parent bafd9522e0
commit 0becf0b4bc
5 changed files with 48 additions and 14 deletions

View File

@@ -8,6 +8,7 @@ import { transformI18n } from "/@/plugins/i18n";
import { storageSession } from "/@/utils/storage";
import { useAppStoreHook } from "/@/store/modules/app";
import { useEpThemeStoreHook } from "/@/store/modules/epTheme";
import { useUserStoreHook } from "/@/store/modules/user";
export function useNav() {
const pureApp = useAppStoreHook();
@@ -38,8 +39,7 @@ export function useNav() {
// 退出登录
function logout() {
storageSession.removeItem("info");
router.push("/login");
useUserStoreHook().logOut();
}
function backHome() {