feat(头部组件): 调整首页判断功能
This commit is contained in:
parent
f30b1b2c4b
commit
7e86892d52
@ -178,19 +178,9 @@ const handleLanguageChange = (item) => {
|
||||
// 检测是否在APP环境中
|
||||
const isInAppEnvironment = ref(false)
|
||||
|
||||
// 定义首页路由列表
|
||||
const homeRoutes = ['/host-center', '/coin-seller', '/invitation-to-register', '/lottery', '/']
|
||||
|
||||
// 计算是否为首页
|
||||
const isCurrentlyHomePage = computed(() => {
|
||||
// 1. 首先检查 props
|
||||
const propsHomePage = props.isHomePage === true || props.isHomePage === 'true'
|
||||
|
||||
// 2. 然后检查路由
|
||||
const routeHomePage = homeRoutes.includes(route.path)
|
||||
|
||||
// 3. 两者任一为true即为首页
|
||||
return propsHomePage || routeHomePage
|
||||
return !!props.isHomePage
|
||||
})
|
||||
|
||||
const handleBack = () => {
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
<div class="agency-center gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('agency_center')"
|
||||
:isHomePage="true"
|
||||
:showLanguageList="true"
|
||||
:title="t('agency_center')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
<div class="host-setting gradient-background-circles">
|
||||
<!-- 使用与HostCenterView相同的头部组件 -->
|
||||
<GeneralHeader
|
||||
:title="t('my_agency')"
|
||||
:showLanguageList="true"
|
||||
:title="t('my_agency')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
<div class="invite-members gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('invite_members')"
|
||||
:isHomePage="false"
|
||||
:showLanguageList="true"
|
||||
:title="t('invite_members')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
<div class="message gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('users_message')"
|
||||
:isHomePage="false"
|
||||
:showLanguageList="true"
|
||||
:title="t('users_message')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
<div class="team-bill gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('team_bill')"
|
||||
:showLanguageList="true"
|
||||
:title="t('team_bill')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
<div class="team-member gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="`${t('team_member')} (${membersTotal})`"
|
||||
:isHomePage="false"
|
||||
:showLanguageList="true"
|
||||
:title="`${t('team_member')} (${membersTotal})`"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<div class="apply-view">
|
||||
<GeneralHeader
|
||||
:title="t('apply_join_team')"
|
||||
:isHomePage="true"
|
||||
:showBack="false"
|
||||
:showLanguageList="true"
|
||||
:title="t('apply_join_team')"
|
||||
color="black"
|
||||
:style="{ borderBottom: '1px solid #E5E5E5' }"
|
||||
/>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="transfer gradient-background-circles">
|
||||
<GeneralHeader
|
||||
:title="t('available_salaries')"
|
||||
:showLanguageList="true"
|
||||
:title="t('available_salaries')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="fullPage">
|
||||
<GeneralHeader
|
||||
style="width: 100%"
|
||||
:title="t('salary_details')"
|
||||
:showLanguageList="true"
|
||||
:title="t('salary_details')"
|
||||
style="width: 100%"
|
||||
color="black"
|
||||
/>
|
||||
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
<div class="bd-center gradient-background-circles">
|
||||
<!-- 顶部导航 -->
|
||||
<GeneralHeader
|
||||
:title="t('bd_center')"
|
||||
:isHomePage="true"
|
||||
:showLanguageList="true"
|
||||
:title="t('bd_center')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
<div class="fullPage">
|
||||
<!-- 顶部导航 -->
|
||||
<GeneralHeader
|
||||
:title="t('invite_become_agent')"
|
||||
:showLanguageList="true"
|
||||
:title="t('invite_become_agent')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
<div class="bd-center gradient-background-circles">
|
||||
<!-- 顶部导航 -->
|
||||
<GeneralHeader
|
||||
:title="t('bd_leader_center')"
|
||||
:isHomePage="true"
|
||||
:showLanguageList="true"
|
||||
:title="t('bd_leader_center')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
<div class="fullPage">
|
||||
<!-- 顶部导航 -->
|
||||
<GeneralHeader
|
||||
:title="t('invite_become_BD')"
|
||||
:showLanguageList="true"
|
||||
:title="t('invite_become_BD')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
<div class="exchange-gold-coins gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('exchange_gold_coins')"
|
||||
:showBack="true"
|
||||
:showLanguageList="true"
|
||||
:title="t('exchange_gold_coins')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
<div class="history-salary gradient-background-circles">
|
||||
<!-- 修改头部使用 GeneralHeader 组件 -->
|
||||
<GeneralHeader
|
||||
:title="t('history_salary')"
|
||||
:showBack="true"
|
||||
:showLanguageList="true"
|
||||
:title="t('history_salary')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
@help="showHelpInfo"
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
<div class="host-center gradient-background-circles">
|
||||
<!-- 顶部导航 -->
|
||||
<GeneralHeader
|
||||
:title="t('host_center')"
|
||||
:isHomePage="true"
|
||||
:showLanguageList="true"
|
||||
:title="t('host_center')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
@help="goToHelp"
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
<div class="host-setting gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('host_setting')"
|
||||
:showBack="true"
|
||||
:showLanguageList="true"
|
||||
:title="t('host_setting')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
<div class="information-details gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('information_details')"
|
||||
:showBack="true"
|
||||
:showLanguageList="true"
|
||||
:title="t('information_details')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -1,7 +1,12 @@
|
||||
<template>
|
||||
<div class="fullPage">
|
||||
<div style="position: absolute; top: 0; left: 0; width: 100%">
|
||||
<GeneralHeader title="Invitation to register" :showHelp="true" @help="helpInfoShow = true" />
|
||||
<GeneralHeader
|
||||
:isHomePage="true"
|
||||
:showHelp="true"
|
||||
title="Invitation to register"
|
||||
@help="helpInfoShow = true"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 确认邀请码 -->
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
<div class="platform-policy gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 组件替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('platform_policy')"
|
||||
:showBack="true"
|
||||
:showLanguageList="true"
|
||||
:title="t('platform_policy')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
<div class="coin-seller-search gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('search_user')"
|
||||
:isHomePage="false"
|
||||
:showLanguageList="true"
|
||||
:title="t('search_user')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
<div class="seller-records gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('seller_records')"
|
||||
:isHomePage="false"
|
||||
:showLanguageList="true"
|
||||
:title="t('seller_records')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
<div class="coin-seller gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('recharge_agency')"
|
||||
:isHomePage="false"
|
||||
:isHomePage="true"
|
||||
:showLanguageList="true"
|
||||
:title="t('recharge_agency')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="fullPage">
|
||||
<GeneralHeader
|
||||
style="width: 100%"
|
||||
:title="t('bank_card')"
|
||||
:showLanguageList="true"
|
||||
color="black"
|
||||
:title="t('bank_card')"
|
||||
:backQuery="backQuery"
|
||||
style="width: 100%"
|
||||
color="black"
|
||||
/>
|
||||
<div style="padding: 16px; display: flex; flex-direction: column; gap: 8px">
|
||||
<!-- 当前使用的银行卡 -->
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
<template>
|
||||
<div class="fullPage">
|
||||
<GeneralHeader
|
||||
style="width: 100%"
|
||||
:title="t('cash_out')"
|
||||
color="rgba(0, 0, 0, 0.80)"
|
||||
:backImg="imgUrl"
|
||||
:showLanguageList="true"
|
||||
:title="t('cash_out')"
|
||||
:backImg="imgUrl"
|
||||
style="width: 100%"
|
||||
color="rgba(0, 0, 0, 0.80)"
|
||||
/>
|
||||
|
||||
<!-- 其余内容保持不变 -->
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
<template>
|
||||
<div class="fullPage">
|
||||
<GeneralHeader
|
||||
style="width: 100%"
|
||||
:title="t('details')"
|
||||
color="rgba(0, 0, 0, 0.80)"
|
||||
:showLanguageList="true"
|
||||
:title="t('details')"
|
||||
style="width: 100%"
|
||||
color="rgba(0, 0, 0, 0.80)"
|
||||
/>
|
||||
|
||||
<div style="padding: 16px; display: flex; flex-direction: column; gap: 12px">
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="fullPage">
|
||||
<GeneralHeader
|
||||
style="width: 100%"
|
||||
:title="t('kyc')"
|
||||
:showLanguageList="true"
|
||||
color="black"
|
||||
:title="t('kyc')"
|
||||
:backQuery="backQuery"
|
||||
style="width: 100%"
|
||||
color="black"
|
||||
/>
|
||||
|
||||
<div style="padding: 16px; display: flex; flex-direction: column; gap: 8px">
|
||||
|
||||
@ -2,12 +2,11 @@
|
||||
<div class="search-payee gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('search_payee')"
|
||||
:showBack="true"
|
||||
:showLanguageList="true"
|
||||
:title="t('search_payee')"
|
||||
:backQuery="backQuery"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
:backQuery="backQuery"
|
||||
/>
|
||||
|
||||
<div class="content">
|
||||
|
||||
@ -2,9 +2,8 @@
|
||||
<div class="transfer gradient-background-circles">
|
||||
<!-- 使用 GeneralHeader 替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('transfer')"
|
||||
:showBack="true"
|
||||
:showLanguageList="true"
|
||||
:title="t('transfer')"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user