feat(header): 在线咨询改右下角悬浮;右侧原位置放登录/注册或我的订单/个人中心入口
This commit is contained in:
@@ -62,8 +62,40 @@
|
|||||||
</template>
|
</template>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<!-- CTA -->
|
<!-- 用户入口(右侧中部悬浮):未登录=登录/注册,已登录=个人中心入口 -->
|
||||||
<div class="hidden lg:block" style="position: fixed; right: 20px; top: 50%; transform: translateY(-50%);">
|
<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;">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
to="/contact"
|
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"
|
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"
|
||||||
@@ -143,6 +175,9 @@ import type { CmsNavigation } from '~/types'
|
|||||||
const { siteInfo, siteName, siteLogo, siteIcon, navigations, showHeaderSearch, fetchSiteInfo } = useSite()
|
const { siteInfo, siteName, siteLogo, siteIcon, navigations, showHeaderSearch, fetchSiteInfo } = useSite()
|
||||||
const mobileMenuOpen = ref(false)
|
const mobileMenuOpen = ref(false)
|
||||||
|
|
||||||
|
const { isLoggedIn } = useHjcAuth()
|
||||||
|
const loggedIn = ref(isLoggedIn())
|
||||||
|
|
||||||
/** 子导航链接统一走 app/utils 的 getNavLink(自动避免 /page/4598?navId=4598 冗余拼接) */
|
/** 子导航链接统一走 app/utils 的 getNavLink(自动避免 /page/4598?navId=4598 冗余拼接) */
|
||||||
function getChildPath(child: CmsNavigation): string {
|
function getChildPath(child: CmsNavigation): string {
|
||||||
return getNavLink(child)
|
return getNavLink(child)
|
||||||
|
|||||||
Reference in New Issue
Block a user