feat(头部组件): 调整首页判断功能

This commit is contained in:
hzj 2025-11-20 19:09:32 +08:00
parent f30b1b2c4b
commit 7e86892d52
30 changed files with 48 additions and 63 deletions

View File

@ -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 = () => {

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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' }"
/>

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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"

View File

@ -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"

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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>
<!-- 确认邀请码 -->

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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"
/>

View File

@ -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">
<!-- 当前使用的银行卡 -->

View File

@ -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)"
/>
<!-- 其余内容保持不变 -->

View File

@ -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">

View File

@ -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">

View File

@ -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">

View File

@ -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"
/>