diff --git a/.vscode/settings.json b/.vscode/settings.json
index 51c04f1..77303a3 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,5 +1,20 @@
{
- "cSpell.words": ["Vitesse", "Vite", "unocss", "vitest", "vueuse", "pinia", "demi", "antfu", "iconify", "intlify", "vitejs", "unplugin", "pnpm"],
+ "cSpell.words": [
+ "antfu",
+ "demi",
+ "iconify",
+ "intlify",
+ "pinia",
+ "pnpm",
+ "realname",
+ "unocss",
+ "unplugin",
+ "Vite",
+ "vitejs",
+ "Vitesse",
+ "vitest",
+ "vueuse"
+ ],
"i18n-ally.sourceLanguage": "zh-CN",
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": "locales",
diff --git a/prettier.config.mjs b/prettier.config.mjs
new file mode 100644
index 0000000..8efdaae
--- /dev/null
+++ b/prettier.config.mjs
@@ -0,0 +1,18 @@
+/**
+ * @see https://prettier.io/docs/configuration
+ * @type {import("prettier").Config}
+ */
+const config = {
+ printWidth: 120,
+ tabWidth: 2,
+ useTabs: false,
+ semi: false,
+ singleQuote: true,
+ quoteProps: "as-needed",
+ bracketSpacing: true,
+ arrowParens: "avoid",
+ htmlWhitespaceSensitivity: "ignore",
+ bracketSameLine: true,
+};
+
+export default config;
\ No newline at end of file
diff --git a/public/beian.ico b/public/beian.ico
new file mode 100644
index 0000000..d305742
Binary files /dev/null and b/public/beian.ico differ
diff --git a/src/components/TheFooter.vue b/src/components/TheFooter.vue
index 91be029..fddab50 100644
--- a/src/components/TheFooter.vue
+++ b/src/components/TheFooter.vue
@@ -113,7 +113,7 @@ async function toggleLocales() {
diff --git a/src/components/TheNavigation.vue b/src/components/TheNavigation.vue
index 4f8134f..bb9a2be 100644
--- a/src/components/TheNavigation.vue
+++ b/src/components/TheNavigation.vue
@@ -14,6 +14,9 @@ const isMobileMenuOpen = ref(false)
const username = ref('')
const password = ref('')
const error = ref('')
+// 获取路由实例
+const router = useRouter()
+// 获取当前路由信息
const route = useRoute()
const routerLinkList = [
@@ -96,11 +99,10 @@ async function handleLogin() {
async function handleLogout() {
try {
- await apiLogout()
+ await userStore.logout()
} catch (e) {
console.error(e)
}
- userStore.logout()
message.success('退出登录成功')
// 登出后关闭菜单
isMobileMenuOpen.value = false
@@ -150,7 +152,7 @@ function handleMobileLinkClick() {
-
+
-
欢迎, {{ userStore.user.username }}
+
欢迎, {{ userStore.userInfo.username }}
GitHub