feat(提现相关页面): 使用新的头部组件,对接语言切换功能并调整布局

This commit is contained in:
hzj 2025-11-03 14:56:17 +08:00
parent 510d527531
commit 22bc2d3898
5 changed files with 70 additions and 29 deletions

View File

@ -230,5 +230,8 @@
"upload_failed": "فشل التحميل", "upload_failed": "فشل التحميل",
"please_enter_contact_number": "يرجى إدخال رقم الاتصال", "please_enter_contact_number": "يرجى إدخال رقم الاتصال",
"invite_user_to_become_bd": "دعوة المستخدم ليصبح BD" "invite_user_to_become_bd": "دعوة المستخدم ليصبح BD",
"under_review": "قيد المراجعة",
"approved": "موافق عليه"
} }

View File

@ -230,5 +230,8 @@
"upload_failed": "Upload failed", "upload_failed": "Upload failed",
"please_enter_contact_number": "Please enter contact number", "please_enter_contact_number": "Please enter contact number",
"invite_user_to_become_bd": "Invite User To Become BD" "invite_user_to_become_bd": "Invite User To Become BD",
"under_review": "Under review",
"approved": "Approved"
} }

View File

@ -230,5 +230,8 @@
"upload_failed": "上传失败", "upload_failed": "上传失败",
"please_enter_contact_number": "请输入联系电话", "please_enter_contact_number": "请输入联系电话",
"invite_user_to_become_bd": "邀请用户成为BD" "invite_user_to_become_bd": "邀请用户成为BD",
"under_review": "审核中",
"approved": "已批准"
} }

View File

@ -1,12 +1,15 @@
// src/views/Wallet/CashOut/CashOut.vue
<template> <template>
<div class="fullPage"> <div class="fullPage">
<GeneralHeader <GeneralHeader
style="width: 100%" style="width: 100%"
title="Cash out" :title="t('cash_out')"
color="color: rgba(0, 0, 0, 0.80)" color="rgba(0, 0, 0, 0.80)"
:backImg="imgUrl" :backImg="imgUrl"
:showLanguageList="true"
/> />
<!-- 其余内容保持不变 -->
<div style="padding: 16px"> <div style="padding: 16px">
<!-- 信息部分 --> <!-- 信息部分 -->
<div> <div>
@ -18,10 +21,10 @@
margin-bottom: 10px; margin-bottom: 10px;
" "
> >
<div style="font-weight: 600">Information</div> <div style="font-weight: 600">{{ t('information') }}</div>
<div style="display: flex; align-items: center" @click="lookDetails"> <div style="display: flex; align-items: center" @click="lookDetails">
<div style="color: rgba(0, 0, 0, 0.4)">Details</div> <div style="color: rgba(0, 0, 0, 0.4)">{{ t('details') }}</div>
<img src="../../../assets/icon/arrow.png" alt="" style="width: 6vw" /> <img class="flipImg" src="../../../assets/icon/arrow.png" alt="" style="width: 6vw" />
</div> </div>
</div> </div>
<div <div
@ -33,7 +36,7 @@
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25); box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
" "
> >
<span style="font-weight: 510; font-size: 0.8em">Withdrawable amount: </span> <span style="font-weight: 510; font-size: 0.8em">{{ t('available_salaries') }} </span>
<span style="font-weight: 700; color: #333">{{ <span style="font-weight: 700; color: #333">{{
currentAmount.availableAmount || 0 currentAmount.availableAmount || 0
}}</span> }}</span>
@ -62,18 +65,19 @@
style="display: flex; justify-content: space-between; align-items: center" style="display: flex; justify-content: space-between; align-items: center"
@click="gotoKYC" @click="gotoKYC"
> >
<span style="font-weight: 510; font-size: 1em">Complete information</span> <span style="font-weight: 510; font-size: 1em">{{ t('complete_information') }}</span>
<img src="../../../assets/icon/arrow.png" alt="" style="width: 6vw" /> <img class="flipImg" src="../../../assets/icon/arrow.png" alt="" style="width: 6vw" />
</div> </div>
<!-- 获取到银行卡信息 --> <!-- 获取到银行卡信息 -->
<div v-else style="width: 100%; display: flex; flex-direction: column; gap: 8px"> <div v-else style="width: 100%; display: flex; flex-direction: column; gap: 8px">
<!-- 图片 --> <!-- 图片 -->
<div style="display: flex; justify-content: space-between; align-items: center"> <div style="display: flex; justify-content: space-between; align-items: center">
<span style="font-weight: 510; font-size: 1em" <span style="font-weight: 510; font-size: 1em">{{
>Passport/ID card:({{ bankCardInfo.cardImages.length }}/3)</span t('passport_id_card', { current: bankCardInfo.cardImages.length })
> }}</span>
<img <img
class="flipImg"
src="../../../assets/icon/arrow.png" src="../../../assets/icon/arrow.png"
alt="" alt=""
style="width: 6vw" style="width: 6vw"
@ -90,13 +94,13 @@
</div> </div>
<!-- 卡号 --> <!-- 卡号 -->
<div style="font-weight: 500">Contact number:</div> <div style="font-weight: 500">{{ t('contact_number') }}:</div>
<div style="color: rgba(0, 0, 0, 0.4); font-weight: 600; font-size: 0.8em"> <div style="color: rgba(0, 0, 0, 0.4); font-weight: 600; font-size: 0.8em">
{{ bankCardInfo.contactNumber }} {{ bankCardInfo.contactNumber }}
</div> </div>
<!-- 备注信息 --> <!-- 备注信息 -->
<div style="font-weight: 500">Other description:</div> <div style="font-weight: 500">{{ t('other_description') }}:</div>
<div style="color: rgba(0, 0, 0, 0.4); font-weight: 600; font-size: 0.8em"> <div style="color: rgba(0, 0, 0, 0.4); font-weight: 600; font-size: 0.8em">
{{ bankCardInfo.description }} {{ bankCardInfo.description }}
</div> </div>
@ -123,7 +127,7 @@
}" }"
@click="CashOut" @click="CashOut"
> >
Cash out {{ t('cash_out') }}
</div> </div>
</div> </div>
</div> </div>
@ -152,14 +156,12 @@
gap: 8px; gap: 8px;
" "
> >
<div style="font-weight: 800; font-size: 1.2em">Tips</div> <div style="font-weight: 800; font-size: 1.2em">{{ t('tips') }}</div>
<div style="color: rgba(0, 0, 0, 0.4); font-weight: 600; font-size: 0.9em"> <div style="color: rgba(0, 0, 0, 0.4); font-weight: 600; font-size: 0.9em">
Please fill in the information carefully. You can only withdraw cash after the {{ t('cash_withdrawal_tips') }}
information is completed.
</div> </div>
<div style="color: rgba(0, 0, 0, 0.4); font-weight: 600; font-size: 0.7em"> <div style="color: rgba(0, 0, 0, 0.4); font-weight: 600; font-size: 0.7em">
*lf there is a problem with the card number and the transfer cannot be made, it will *{{ t('cash_withdrawal_tips') }}
result in the review being.
</div> </div>
<div style="display: flex; justify-content: center; align-items: center"> <div style="display: flex; justify-content: center; align-items: center">
<div <div
@ -176,7 +178,7 @@
" "
@click="Receive" @click="Receive"
> >
Receive {{ t('receive') }}
</div> </div>
</div> </div>
</div> </div>
@ -186,6 +188,7 @@
</template> </template>
<script setup> <script setup>
import { useI18n } from 'vue-i18n'
import GeneralHeader from '@/components/GeneralHeader.vue' import GeneralHeader from '@/components/GeneralHeader.vue'
import maskLayer from '@/components/MaskLayer.vue' import maskLayer from '@/components/MaskLayer.vue'
import { import {
@ -195,9 +198,15 @@ import {
import { setApplyInfo, getApplyInfo } from '@/utils/applyStore.js' import { setApplyInfo, getApplyInfo } from '@/utils/applyStore.js'
import { ref, onMounted, computed, onUnmounted } from 'vue' import { ref, onMounted, computed, onUnmounted } from 'vue'
import { useRouter, useRoute } from 'vue-router' import { useRouter, useRoute } from 'vue-router'
import { setDocumentDirection } from '@/locales/i18n'
const { t, locale } = useI18n()
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
//
locale.value && setDocumentDirection(locale.value)
const activityId = route.query.activityId || '' const activityId = route.query.activityId || ''
const imgUrl = new URL('../../../assets/icon/arrowBackBlack.png', import.meta.url).href const imgUrl = new URL('../../../assets/icon/arrowBackBlack.png', import.meta.url).href
@ -303,4 +312,9 @@ onUnmounted(() => {
font-size: 32px; font-size: 32px;
} }
} }
/* RTL支持 */
[dir='rtl'] .flipImg {
transform: scaleX(-1);
}
</style> </style>

View File

@ -1,6 +1,12 @@
// src/views/Wallet/CashOut/Details.vue
<template> <template>
<div class="fullPage"> <div class="fullPage">
<GeneralHeader style="width: 100%" title="Details" color="color: rgba(0, 0, 0, 0.80)" /> <GeneralHeader
style="width: 100%"
:title="t('details')"
color="rgba(0, 0, 0, 0.80)"
:showLanguageList="true"
/>
<div style="padding: 16px; display: flex; flex-direction: column; gap: 12px"> <div style="padding: 16px; display: flex; flex-direction: column; gap: 12px">
<div <div
@ -16,7 +22,7 @@
" "
> >
<div style="display: flex; justify-content: space-between; align-items: center"> <div style="display: flex; justify-content: space-between; align-items: center">
<div style="font-weight: 600">Cash out</div> <div style="font-weight: 600">{{ t('cash_out') }}</div>
<div style="font-weight: 600">${{ record.amount }}</div> <div style="font-weight: 600">${{ record.amount }}</div>
</div> </div>
<div style="display: flex; justify-content: space-between; align-items: center"> <div style="display: flex; justify-content: space-between; align-items: center">
@ -48,22 +54,29 @@
</template> </template>
<script setup> <script setup>
import { useI18n } from 'vue-i18n'
import GeneralHeader from '@/components/GeneralHeader.vue' import GeneralHeader from '@/components/GeneralHeader.vue'
import { ref, onMounted, watch, computed } from 'vue' import { ref, onMounted } from 'vue'
import { formatUTCCustom } from '@/utils/utcFormat.js' import { formatUTCCustom } from '@/utils/utcFormat.js'
import { setDocumentDirection } from '@/locales/i18n'
import { import {
withdrawRecords, // withdrawRecords, //
} from '@/api/lottery' } from '@/api/lottery'
const { t, locale } = useI18n()
//
locale.value && setDocumentDirection(locale.value)
const records = ref([]) const records = ref([])
const showStatus = (item) => { const showStatus = (item) => {
if (item.status == 0) { if (item.status == 0) {
return 'Under review' return t('under_review')
} else if (item.status == 1) { } else if (item.status == 1) {
return 'Approved' return t('approved')
} else if (item.status == 2) { } else if (item.status == 2) {
return 'Rejection' return t('rejection')
} }
} }
@ -121,4 +134,9 @@ onMounted(() => {
font-size: 32px; font-size: 32px;
} }
} }
/* RTL支持 */
[dir='rtl'] .flipImg {
transform: scaleX(-1);
}
</style> </style>