2025-01-13 01:57:40 +00:00
|
|
|
<script setup>
|
2025-01-23 11:43:45 +00:00
|
|
|
import { useAppHeaderRouteNames as routeWhiteList } from '@/config'
|
2025-02-11 07:27:31 +00:00
|
|
|
import { liveStore } from "@/stores/live/index.js";
|
2025-02-12 08:50:52 +00:00
|
|
|
import {goodStore} from "~/stores/goods/index.js";
|
2025-02-11 07:27:31 +00:00
|
|
|
const { fullLive } = liveStore()
|
2025-01-08 05:26:12 +00:00
|
|
|
const route = useRoute()
|
|
|
|
const router = useRouter()
|
2025-02-12 08:50:52 +00:00
|
|
|
const {auctionDetail} = goodStore();
|
2025-01-08 05:26:12 +00:00
|
|
|
function onBack() {
|
2025-01-13 12:59:25 +00:00
|
|
|
if (fullLive.value){
|
|
|
|
fullLive.value=false
|
|
|
|
return
|
|
|
|
}
|
2025-01-08 05:26:12 +00:00
|
|
|
if (window.history.state.back)
|
|
|
|
history.back()
|
|
|
|
else
|
|
|
|
router.replace('/')
|
|
|
|
}
|
|
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
|
|
|
const title = computed(() => {
|
2025-01-13 03:25:37 +00:00
|
|
|
|
2025-01-08 05:26:12 +00:00
|
|
|
if (!route.meta)
|
|
|
|
return ''
|
|
|
|
return route.meta.i18n ? t(route.meta.i18n) : (route.meta.title || '')
|
|
|
|
})
|
2025-01-13 03:25:37 +00:00
|
|
|
const subTitle = computed(() => {
|
|
|
|
if (!route.meta)
|
|
|
|
return ''
|
|
|
|
return route.meta.subTitle ? t(route.meta.subTitle) : ''
|
|
|
|
})
|
2025-01-08 05:26:12 +00:00
|
|
|
const showLeftArrow = computed(() => route.name && routeWhiteList.includes(route.name))
|
2025-01-23 07:28:31 +00:00
|
|
|
|
2025-01-08 05:26:12 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<VanNavBar
|
2025-01-23 07:28:31 +00:00
|
|
|
v-memo="[title,fullLive,showLeftArrow,subTitle]"
|
2025-01-08 05:26:12 +00:00
|
|
|
:title="title"
|
2025-01-13 12:59:25 +00:00
|
|
|
:left-arrow="!showLeftArrow||fullLive"
|
2025-01-08 05:26:12 +00:00
|
|
|
placeholder clickable fixed
|
|
|
|
@click-left="onBack"
|
2025-01-10 08:52:58 +00:00
|
|
|
>
|
2025-02-12 08:50:52 +00:00
|
|
|
<template #title v-if="route.meta.i18n==='menu.home'">
|
2025-01-10 08:52:58 +00:00
|
|
|
<div class="flex flex-col items-center justify-center">
|
2025-02-12 08:50:52 +00:00
|
|
|
<div class="text-#000000 text-17px mb-5px font-600">{{ auctionDetail.title }}</div>
|
2025-01-10 08:52:58 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</VanNavBar>
|
2025-01-08 05:26:12 +00:00
|
|
|
</template>
|