diff --git a/.vscode/settings.json b/.vscode/settings.json index a274665..8a63266 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -36,5 +36,8 @@ "./apps/user", "./packages/eslint-config" ], - "totvsLanguageServer.welcomePage": false // ` + "totvsLanguageServer.welcomePage": false, + "cSpell.words": [ + "activityinfo" + ] // ` } diff --git a/apps/admin/src/assets/imgs/user/cover-bg-active.svg b/apps/admin/src/assets/imgs/user/cover-bg-active.svg index 6cac4bb..4567f0c 100644 --- a/apps/admin/src/assets/imgs/user/cover-bg-active.svg +++ b/apps/admin/src/assets/imgs/user/cover-bg-active.svg @@ -1,69 +1 @@ - + \ No newline at end of file diff --git a/apps/admin/src/components/custom/user/CompetitionLayout.vue b/apps/admin/src/components/custom/user/CompetitionLayout.vue index 1f2df3d..3f4d1c5 100644 --- a/apps/admin/src/components/custom/user/CompetitionLayout.vue +++ b/apps/admin/src/components/custom/user/CompetitionLayout.vue @@ -2,6 +2,7 @@ import VScaleScreen from 'v-scale-screen' import { onMounted, ref } from 'vue' import _defaultBg from '@/assets/imgs/user/home-bg.svg' +import { useRouterPush } from '@/hooks/common/router' interface Props { /** 是否显示返回按钮 */ @@ -44,6 +45,8 @@ const emit = defineEmits<{ (e: 'next'): void }>() +const { routerPushByKey } = useRouterPush() + // const router = useRouter() const innerBgUrl = ref(_defaultBg) @@ -66,8 +69,6 @@ const showContent = ref(false) function handleBack() { emit('back') - // 如果没有监听 back 事件,默认行为可以是路由返回 - // if (!emit('back')) router.back() // 需要判断是否有监听器比较麻烦,这里建议由父组件控制或提供默认行为 } function handleNext() { @@ -76,6 +77,11 @@ function handleNext() { emit('next') } +/** 点击返回首页 */ +function handleBackHome() { + routerPushByKey('user_home') +} + onMounted(() => { fetchSystemConfig() setTimeout(() => { @@ -93,7 +99,7 @@ onMounted(() => {