revert(header): 撤回 Header 静态「标书中心」入口与登录/在线咨询重构,入口改由后台 /tender 导航驱动
This commit is contained in:
@@ -62,40 +62,8 @@
|
||||
</template>
|
||||
</nav>
|
||||
|
||||
<!-- 用户入口(右侧中部悬浮):未登录=登录/注册,已登录=个人中心入口 -->
|
||||
<div class="hidden lg:flex flex-col gap-3" style="position: fixed; right: 20px; top: 50%; transform: translateY(-50%);">
|
||||
<template v-if="loggedIn">
|
||||
<NuxtLink
|
||||
to="/tender/orders"
|
||||
class="inline-flex items-center justify-center px-4 py-2 bg-blue-600 text-white text-sm font-semibold rounded-full hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
我的订单
|
||||
</NuxtLink>
|
||||
<NuxtLink
|
||||
to="/tender/qualification"
|
||||
class="inline-flex items-center justify-center px-4 py-2 bg-blue-600 text-white text-sm font-semibold rounded-full hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
个人中心
|
||||
</NuxtLink>
|
||||
</template>
|
||||
<template v-else>
|
||||
<NuxtLink
|
||||
to="/login"
|
||||
class="inline-flex items-center justify-center px-4 py-2 bg-blue-600 text-white text-sm font-semibold rounded-full hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
登录
|
||||
</NuxtLink>
|
||||
<NuxtLink
|
||||
to="/register"
|
||||
class="inline-flex items-center justify-center px-4 py-2 border border-blue-600 text-blue-600 text-sm font-semibold rounded-full hover:bg-blue-50 transition-colors"
|
||||
>
|
||||
注册
|
||||
</NuxtLink>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- 在线咨询(右下角悬浮) -->
|
||||
<div class="hidden lg:block" style="position: fixed; right: 20px; bottom: 20px;">
|
||||
<!-- CTA -->
|
||||
<div class="hidden lg:block" style="position: fixed; right: 20px; top: 50%; transform: translateY(-50%);">
|
||||
<NuxtLink
|
||||
to="/contact"
|
||||
class="inline-flex items-center justify-center px-4 py-2 bg-blue-600 text-white text-base font-semibold rounded-full hover:bg-blue-700 transition-colors"
|
||||
@@ -175,9 +143,6 @@ import type { CmsNavigation } from '~/types'
|
||||
const { siteInfo, siteName, siteLogo, siteIcon, navigations, showHeaderSearch, fetchSiteInfo } = useSite()
|
||||
const mobileMenuOpen = ref(false)
|
||||
|
||||
const { isLoggedIn } = useHjcAuth()
|
||||
const loggedIn = ref(isLoggedIn())
|
||||
|
||||
/** 子导航链接统一走 app/utils 的 getNavLink(自动避免 /page/4598?navId=4598 冗余拼接) */
|
||||
function getChildPath(child: CmsNavigation): string {
|
||||
return getNavLink(child)
|
||||
@@ -186,9 +151,8 @@ function getChildPath(child: CmsNavigation): string {
|
||||
// 获取站点信息(含导航数据)
|
||||
await fetchSiteInfo()
|
||||
|
||||
/** 导航项(使用 useSite 合并 topNavs + bottomNavs 并过滤 top===1 的导航;静态前置「标书中心」入口) */
|
||||
/** 导航项(使用 useSite 合并 topNavs + bottomNavs 并过滤 top===1 的导航) */
|
||||
const navItems = computed<CmsNavigation[]>(() => {
|
||||
const staticNav: CmsNavigation = { title: '标书中心', path: '/tender' }
|
||||
return [staticNav, ...(navigations.value || [])]
|
||||
return navigations.value || []
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user