diff --git a/README.md b/README.md index bc9d384..aff6cd4 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ node .output/server/index.mjs 服务器运行 ## 必应搜索 - + ## 📝 License diff --git a/composables/useAuth.js b/composables/useAuth.js index c3c6112..8b0372e 100644 --- a/composables/useAuth.js +++ b/composables/useAuth.js @@ -14,6 +14,7 @@ import { showToast } from "vant"; export const useAuth = createGlobalState(() => { const router = useRouter(); + const localePath = useLocalePath(); // Use Nuxt useCookie for SSR compatibility const token = useCookie("token", { default: () => "" }); @@ -52,10 +53,12 @@ export const useAuth = createGlobalState(() => { const res = await voteAPI({ workUid: workUid.value }); if (res.status === 0) { showToast("投票成功"); - router.push({ - path: "/result", - query: { type: "hasVoted" }, - }); + router.push( + localePath({ + path: "/result", + query: { type: "hasVoted" }, + }) + ); } }; @@ -145,10 +148,12 @@ export const useAuth = createGlobalState(() => { const res = await competitionApply(formData.value); if (res.status === 0) { showToast("报名成功"); - router.push({ - path: "/result", - query: { type: "success" }, - }); + router.push( + localePath({ + path: "/result", + query: { type: "success" }, + }) + ); } }; @@ -163,10 +168,10 @@ export const useAuth = createGlobalState(() => { if (res.data.status === 1) { showToast("您已经报名"); await getDetail(); - router.push("/details"); + router.push(localePath("/details")); } else { showToast("登录成功"); - router.push("/signup"); + router.push(localePath("/signup")); } } }; diff --git a/src/components/customFooter/size1440/index.vue b/src/components/customFooter/size1440/index.vue index 19b6d16..b0f4d58 100644 --- a/src/components/customFooter/size1440/index.vue +++ b/src/components/customFooter/size1440/index.vue @@ -15,17 +15,11 @@ diff --git a/src/components/customFooter/size1920/index.vue b/src/components/customFooter/size1920/index.vue index 476d859..9455c07 100644 --- a/src/components/customFooter/size1920/index.vue +++ b/src/components/customFooter/size1920/index.vue @@ -3,8 +3,12 @@