style: 补充缺失的翻译文本
This commit is contained in:
parent
446c33145b
commit
001745fa0e
@ -232,6 +232,7 @@
|
||||
<script setup>
|
||||
import { ref, computed, onMounted, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useLangStore } from '@/stores/lang'
|
||||
import { formatBillStatus, getTeamReleasePolicy } from '../../api/teamBill.js'
|
||||
import { getTeamId } from '../../utils/userStore.js'
|
||||
import { setDocumentDirection } from '@/locales/i18n'
|
||||
@ -259,6 +260,8 @@ const targetUserId = ref('') //搜索目标id
|
||||
// 样式
|
||||
const color = ref('')
|
||||
const boxShadow = ref('')
|
||||
const typeShowText = ref('')
|
||||
const langStore = useLangStore()
|
||||
|
||||
// 从 billData 中获取成员数据
|
||||
const members = computed(() => {
|
||||
@ -329,9 +332,9 @@ const formatTargetDisplay = (giftValue) => {
|
||||
|
||||
// 格式化状态文本
|
||||
const getStatusText = (status) => {
|
||||
const statusInfo = formatBillStatus(status)
|
||||
// const statusInfo = formatBillStatus(status)
|
||||
// 使用翻译键而不是直接文本
|
||||
switch (statusInfo.textKey) {
|
||||
switch (status) {
|
||||
case 'Completed':
|
||||
return t('completed')
|
||||
case 'Pending':
|
||||
@ -391,25 +394,51 @@ const handleImageError = (event) => {
|
||||
// 可以在这里设置默认头像
|
||||
}
|
||||
|
||||
// 更新展示类型
|
||||
const updateTypeShowText = () => {
|
||||
console.log('更新展示类型')
|
||||
let type = props.billData?.status
|
||||
if (type == 'In Progress') {
|
||||
typeShowText.value = t('in_progress')
|
||||
} else if (type == 'Pending') {
|
||||
typeShowText.value = t('pending')
|
||||
} else if (type == 'Completed') {
|
||||
typeShowText.value = t('completed')
|
||||
} else if (type == 'Out of account') {
|
||||
typeShowText.value = t('out_of_account')
|
||||
}
|
||||
}
|
||||
|
||||
// 监听语言变化,确保UI更新
|
||||
watch(
|
||||
() => langStore.selectedLang,
|
||||
(newLang) => {
|
||||
console.log('Language changed in header:', newLang)
|
||||
updateTypeShowText()
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
|
||||
watch(
|
||||
() => props.billData?.status,
|
||||
(status) => {
|
||||
console.log('status:', status)
|
||||
(newType) => {
|
||||
console.log('newType:', newType)
|
||||
|
||||
let newStatus = getStatusText(status)
|
||||
if (newStatus == t('in_progress')) {
|
||||
// let newStatus = getStatusText(status)
|
||||
updateTypeShowText()
|
||||
if (newType == 'In Progress') {
|
||||
boxShadow.value = '0 0 1px 0 #6085FF'
|
||||
color.value = 'rgba(61, 115, 255, 1)'
|
||||
}
|
||||
if (newStatus == t('pending')) {
|
||||
if (newType == 'Pending') {
|
||||
boxShadow.value = '0 0 1px 0 #FF6062'
|
||||
color.value = 'rgba(255, 61, 64, 1)'
|
||||
}
|
||||
if (newStatus == t('completed')) {
|
||||
if (newType == 'Completed') {
|
||||
boxShadow.value = '0 0 1px 0 #60FF65'
|
||||
color.value = 'rgba(61, 255, 84, 1)'
|
||||
}
|
||||
if (newStatus == t('out_of_account')) {
|
||||
if (newType == 'Out of account') {
|
||||
boxShadow.value = '0 0 1px 0 #6A6161'
|
||||
color.value = 'rgba(174, 174, 174, 1)'
|
||||
}
|
||||
@ -422,6 +451,8 @@ watch(
|
||||
|
||||
// 组件挂载时获取政策数据
|
||||
onMounted(() => {
|
||||
console.log('locale.value:', locale.value)
|
||||
|
||||
fetchPolicyData()
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -260,5 +260,10 @@
|
||||
"cash_out_rule_3": "3. إذا لم يقم المستخدم بتنفيذ أي عملية قبل انتهاء الحدث، سيُعتبر ذلك أنهم استبعدوا الفرصة لاستلام الدولارات، وسيتم مسح الدولارات التي استلموها بواسطة النظام.",
|
||||
"withdrawable_amount": "المبلغ القابل للسحب: {amount}",
|
||||
"fill_info_tips": "يرجى ملء المعلومات بعناية. يمكنك سحب النقدي فقط بعد اكتمال المعلومات.",
|
||||
"card_issue_tips": "* إذا كان هناك مشكلة في رقم البطاقة ولا يمكن إجراء التحويل، فإن ذلك سيؤدي إلى رفض المراجعة."
|
||||
"card_issue_tips": "* إذا كان هناك مشكلة في رقم البطاقة ولا يمكن إجراء التحويل، فإن ذلك سيؤدي إلى رفض المراجعة.",
|
||||
|
||||
"bd": "BD",
|
||||
"bd_leader": "قائد BD",
|
||||
"bd_salary": "راتب BD",
|
||||
"bd_leader_history": "سجل قائد BD"
|
||||
}
|
||||
|
||||
@ -260,5 +260,10 @@
|
||||
"cash_out_rule_3": "3. If the user does not perform any operation before the end of the event, it will be deemed that they have given up the opportunity to receive the dollars, and the dollars they have received will be cleared by the system.",
|
||||
"withdrawable_amount": "Withdrawable amount: {amount}",
|
||||
"fill_info_tips": "Please fill in the information carefully. You can only withdraw cash after the information is completed.",
|
||||
"card_issue_tips": "* If there is a problem with the card number and the transfer cannot be made, it will result in the review being rejected."
|
||||
"card_issue_tips": "* If there is a problem with the card number and the transfer cannot be made, it will result in the review being rejected.",
|
||||
|
||||
"bd": "BD",
|
||||
"bd_leader": "BD Leader",
|
||||
"bd_salary": "BD Salary",
|
||||
"bd_leader_history": "BD Leader History"
|
||||
}
|
||||
|
||||
@ -260,5 +260,10 @@
|
||||
"cash_out_rule_3": "3.如果用户在活动结束前没有进行任何操作,则视为其放弃了获得美元的机会,并且其已收到的美元将被系统清空。",
|
||||
"withdrawable_amount": "可提取金额:{amount}",
|
||||
"fill_info_tips": "请仔细填写信息。信息填写完整后才能取款。",
|
||||
"card_issue_tips": "*如果卡号有问题导致转账无法完成,则审核将被拒绝。"
|
||||
"card_issue_tips": "*如果卡号有问题导致转账无法完成,则审核将被拒绝。",
|
||||
|
||||
"bd": "BD",
|
||||
"bd_leader": "BD主管",
|
||||
"bd_salary": "BD工资",
|
||||
"bd_leader_history": "BD主管历史记录"
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
|
||||
}"
|
||||
>
|
||||
{{ t(action.name.toLowerCase()) }}
|
||||
{{ t(action.lang) }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -496,7 +496,11 @@ const loading = ref(false)
|
||||
const maskLayerShow = ref(false)
|
||||
|
||||
// 操作按钮
|
||||
const actions = ref([{ name: 'Exchange' }, { name: 'Transfer' }, { name: 'Cash out' }])
|
||||
const actions = ref([
|
||||
{ name: 'Exchange', lang: 'exchange' },
|
||||
{ name: 'Transfer', lang: 'transfer' },
|
||||
{ name: 'Cash out', lang: 'cash_out' },
|
||||
])
|
||||
|
||||
// 查看历史提现信息
|
||||
const gotoKYC = () => {
|
||||
|
||||
@ -94,7 +94,12 @@
|
||||
<span style="font-weight: 600; color: #1f2937">
|
||||
{{ t('available_salaries') }} ${{ salaryInfo.currentSalary }}
|
||||
</span>
|
||||
<img src="../assets/icon/arrow.png" alt="" style="display: block; width: 20px" />
|
||||
<img
|
||||
src="../assets/icon/arrow.png"
|
||||
alt=""
|
||||
style="display: block; width: 20px"
|
||||
class="flipImg"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -118,7 +123,12 @@
|
||||
>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span style="font-weight: 600; color: #1f2937"> {{ t('invite_become_agent') }}</span>
|
||||
<img src="../assets/icon/arrow.png" alt="" style="display: block; width: 20px" />
|
||||
<img
|
||||
src="../assets/icon/arrow.png"
|
||||
alt=""
|
||||
style="display: block; width: 20px"
|
||||
class="flipImg"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -139,7 +149,7 @@
|
||||
gap: 10px;
|
||||
"
|
||||
>
|
||||
<div style="font-weight: 700">BD</div>
|
||||
<div style="font-weight: 700">{{ t('bd') }}</div>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div style="font-weight: 600">{{ BDData.billTitle }}</div>
|
||||
<img
|
||||
@ -248,7 +258,9 @@
|
||||
@click.stop
|
||||
>
|
||||
<div style="display: flex; justify-content: center; align-items: center">
|
||||
<div style="margin: 0; font-size: 18px; font-weight: 600; color: #333">BD Salary</div>
|
||||
<div style="margin: 0; font-size: 18px; font-weight: 600; color: #333">
|
||||
{{ t('bd_salary') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 等级卡片 -->
|
||||
@ -658,4 +670,8 @@ onMounted(() => {
|
||||
[dir='rtl'] .user-info {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
[dir='rtl'] .flipImg {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -89,7 +89,12 @@
|
||||
<span style="font-weight: 600; color: #1f2937">
|
||||
{{ t('available_salaries') }} ${{ salaryInfo.currentSalary }}
|
||||
</span>
|
||||
<img src="../../assets/icon/arrow.png" alt="" style="display: block; width: 20px" />
|
||||
<img
|
||||
src="../../assets/icon/arrow.png"
|
||||
alt=""
|
||||
style="display: block; width: 20px"
|
||||
class="flipImg"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -110,7 +115,12 @@
|
||||
>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span style="font-weight: 600; color: #1f2937"> {{ t('invite_become_agent') }}</span>
|
||||
<img src="../../assets/icon/arrow.png" alt="" style="display: block; width: 20px" />
|
||||
<img
|
||||
src="../../assets/icon/arrow.png"
|
||||
alt=""
|
||||
style="display: block; width: 20px"
|
||||
class="flipImg"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -131,7 +141,12 @@
|
||||
<span style="font-weight: 600; color: #1f2937">
|
||||
{{ t('invite_user_to_become_bd') }}</span
|
||||
>
|
||||
<img src="../../assets/icon/arrow.png" alt="" style="display: block; width: 20px" />
|
||||
<img
|
||||
src="../../assets/icon/arrow.png"
|
||||
alt=""
|
||||
style="display: block; width: 20px"
|
||||
class="flipImg"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -164,7 +179,7 @@
|
||||
position: 'relative',
|
||||
}"
|
||||
>
|
||||
{{ tab.name }}
|
||||
{{ t(tab.langKey) }}
|
||||
</button>
|
||||
<!-- 移动下划线 -->
|
||||
<!-- <div
|
||||
@ -403,7 +418,7 @@
|
||||
>
|
||||
<div style="display: flex; justify-content: center; align-items: center">
|
||||
<div style="margin: 0; font-size: 18px; font-weight: 600; color: #333">
|
||||
{{ currentHistoryType === 'bd' ? 'BD Salary' : 'BD Leader History' }}
|
||||
{{ currentHistoryType === 'bd' ? t('bd_salary') : t('bd_leader_history') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -729,8 +744,8 @@ locale.value && setDocumentDirection(locale.value)
|
||||
|
||||
// 标签页数据
|
||||
const tabs = ref([
|
||||
{ id: 1, name: 'BD' },
|
||||
{ id: 2, name: 'BD Leader' },
|
||||
{ id: 1, langKey: 'bd' },
|
||||
{ id: 2, langKey: 'bd_leader' },
|
||||
])
|
||||
|
||||
const activeTab = ref(1)
|
||||
@ -950,4 +965,8 @@ onMounted(() => {
|
||||
[dir='rtl'] .user-info {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
[dir='rtl'] .flipImg {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user