diff --git a/mock/user.ts b/mock/user.ts deleted file mode 100644 index 34389c0..0000000 --- a/mock/user.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { MockMethod } from "vite-plugin-mock"; - -export default [ - { - url: "/login", - method: "post", - response: ({ body }) => { - if (body.username === "admin") { - return { - username: "admin", - expires: 24 * 60 * 60, - accessToken: "eyJhbGciOiJIUzUxMiJ9.admin" - }; - } else { - return { - username: "test", - expires: 24 * 60 * 60, - accessToken: "eyJhbGciOiJIUzUxMiJ9.test" - }; - } - } - } -] as MockMethod[]; diff --git a/src/layout/components/navbar.vue b/src/layout/components/navbar.vue index 156b9b4..d6e0057 100644 --- a/src/layout/components/navbar.vue +++ b/src/layout/components/navbar.vue @@ -23,7 +23,7 @@ const { changeTitle, toggleSideBar, pureApp, - usename, + username, getDropdownItemStyle } = useNav(); @@ -94,7 +94,7 @@ function translationEn() { -

{{ usename }}

+

{{ username }}