feat(平台政策页): 使用新的头部组件,对接语言切换功能并调整布局
This commit is contained in:
parent
c11d7f4d1b
commit
4063166272
@ -130,6 +130,8 @@
|
||||
"basic_salary": "الراتب الأساسي",
|
||||
"reward_amount": "جائزة النشاط",
|
||||
|
||||
"no_policy_data_available": "لا توجد بيانات سياسة متاحة",
|
||||
|
||||
"application_record_not_found": "Application record not found",
|
||||
"application_processed_cannot_cancel": "Application has been processed and cannot be canceled",
|
||||
"cancellation_failed_try_again": "Cancellation failed, please try again",
|
||||
|
||||
@ -130,6 +130,8 @@
|
||||
"basic_salary": "Basic Salary",
|
||||
"reward_amount": "Reward Amount",
|
||||
|
||||
"no_policy_data_available": "No policy data available",
|
||||
|
||||
"application_record_not_found": "Application record not found",
|
||||
"application_processed_cannot_cancel": "Application has been processed and cannot be canceled",
|
||||
"cancellation_failed_try_again": "Cancellation failed, please try again",
|
||||
|
||||
@ -130,6 +130,8 @@
|
||||
"basic_salary": "基础薪资",
|
||||
"reward_amount": "活动奖金",
|
||||
|
||||
"no_policy_data_available": "无可用政策数据",
|
||||
|
||||
"application_record_not_found": "申请记录未找到",
|
||||
"application_processed_cannot_cancel": "申请已被处理,无法取消",
|
||||
"cancellation_failed_try_again": "取消失败,请重试",
|
||||
|
||||
@ -1,6 +1,13 @@
|
||||
<template>
|
||||
<div class="platform-policy gradient-background-circles">
|
||||
<MobileHeader title="Platform Policy" />
|
||||
<!-- 使用 GeneralHeader 组件替换 MobileHeader -->
|
||||
<GeneralHeader
|
||||
:title="t('platform_policy')"
|
||||
:showBack="true"
|
||||
:showLanguageList="true"
|
||||
color="black"
|
||||
style="box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); z-index: 999"
|
||||
/>
|
||||
|
||||
<div class="content">
|
||||
<!-- 政策列表 -->
|
||||
@ -31,11 +38,11 @@
|
||||
gap: 5px;
|
||||
"
|
||||
>
|
||||
<div style="font-weight: 600">Time (hours)</div>
|
||||
<div style="font-weight: 600">{{ t('time') }} ({{ t('hours') }})</div>
|
||||
<div style="font-weight: 500">{{ policy.onlineTime || 0 }}</div>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column; align-items: center; gap: 5px">
|
||||
<div style="font-weight: 600">Target</div>
|
||||
<div style="font-weight: 600">{{ t('target') }}</div>
|
||||
<div style="font-weight: 500">
|
||||
{{ formatTarget(policy.target) }}
|
||||
</div>
|
||||
@ -50,7 +57,7 @@
|
||||
gap: 5px;
|
||||
"
|
||||
>
|
||||
<div style="font-weight: 600">Host salary</div>
|
||||
<div style="font-weight: 600">{{ t('host_salary') }}</div>
|
||||
<div style="font-weight: 500">${{ policy.memberSalary || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -64,11 +71,11 @@
|
||||
gap: 5px;
|
||||
"
|
||||
>
|
||||
<div style="font-weight: 600">Agency Salary</div>
|
||||
<div style="font-weight: 600">{{ t('agent_salary') }}</div>
|
||||
<div style="font-weight: 500">${{ policy.ownSalary || 0 }}</div>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column; align-items: center; gap: 5px">
|
||||
<div style="font-weight: 600">Total Salary</div>
|
||||
<div style="font-weight: 600">{{ t('total_salary') }}</div>
|
||||
<div style="font-weight: 500">${{ policy.totalSalary || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -78,7 +85,7 @@
|
||||
<!-- 空状态 -->
|
||||
<div v-else class="empty-state">
|
||||
<div class="empty-icon">📋</div>
|
||||
<p>No policy data available</p>
|
||||
<p>{{ t('no_policy_data_available') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -86,12 +93,17 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import MobileHeader from '../components/MobileHeader.vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import GeneralHeader from '@/components/GeneralHeader.vue'
|
||||
import { get } from '../utils/http.js'
|
||||
import { getTeamId } from '@/utils/userStore.js'
|
||||
import { setDocumentDirection } from '@/locales/i18n'
|
||||
|
||||
const { t, locale } = useI18n()
|
||||
|
||||
// 监听语言变化并设置文档方向
|
||||
locale.value && setDocumentDirection(locale.value)
|
||||
|
||||
const router = useRouter()
|
||||
const loading = ref(false)
|
||||
const policies = ref([])
|
||||
const role = ref('')
|
||||
@ -135,11 +147,11 @@ const formatTarget = (target) => {
|
||||
// 格式化奖励类型
|
||||
const formatRewardType = (type) => {
|
||||
const typeMap = {
|
||||
AVATAR_FRAME: 'Avatar Frame',
|
||||
RIDE: 'Ride Effect',
|
||||
THEME: 'Theme',
|
||||
BADGE: 'Badge',
|
||||
GIFT: 'Gift',
|
||||
AVATAR_FRAME: t('avatar_frame'),
|
||||
RIDE: t('ride_effect'),
|
||||
THEME: t('theme'),
|
||||
BADGE: t('badge'),
|
||||
GIFT: t('gift'),
|
||||
}
|
||||
return typeMap[type] || type
|
||||
}
|
||||
@ -406,4 +418,9 @@ onMounted(() => {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
/* RTL支持 */
|
||||
[dir='rtl'] .policy-grid {
|
||||
direction: rtl;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user