diff --git a/src/api/wallet.js b/src/api/wallet.js index d1f9e4f..96577b4 100644 --- a/src/api/wallet.js +++ b/src/api/wallet.js @@ -341,3 +341,15 @@ export const withdrawApply = async (data) => { throw error } } + +// 获取提现记录 +export const apiGetCashOutRecords = async () => { + try { + const response = await get(`/activity/lottery/withdraw/records`) + return response + } catch (error) { + console.error('Failed to fetch get cash out records:', error) + console.error('error:' + error.response.errorMsg) + throw error + } +} diff --git a/src/views/BDCenter/availableIncome.vue b/src/views/BDCenter/availableIncome.vue index 1dee53b..64344d2 100644 --- a/src/views/BDCenter/availableIncome.vue +++ b/src/views/BDCenter/availableIncome.vue @@ -19,10 +19,10 @@ " >
{{ t('available_salaries') }}
-
+
+
-
-
-
{{ t('cash_out') }}
-
${{ record.amount }}
-
-
-
- {{ record.date }} -
-
- {{ getStatusText(record.status) }} -
-
-
- - -
-
{{ t('transfer') }}
+
-
-
- -
-
-
asdfasdfasdfasdsfasfasfasd
-
- ID:1234567890 -
-
- 21/10/2025 17:56 -
-
+
+
{{ t('cash_out') }}
+
${{ record.amount }}
- -
- {{ t('plus_coins', { amount: '10000' }) }} +
+
+ {{ record.date }} +
+
+ {{ getStatusText(record.status) }} +
- +
+
{{ t('transfer') }}
+
+
+
+ +
+
+
{{ record.name }}
+
+ ID:{{ record.id }} +
+
+
+ +
+ {{ t('plus_coins', { amount: record.amount }) }} +
+
+ +
+ 21/10/2025 17:56 +
+
+ + +
{{ record.type }}
-
- {{ record.amount }} -
+
-${{ record.amount }}
{{ record.date }} @@ -144,52 +120,65 @@ import { useI18n } from 'vue-i18n' import GeneralHeader from '@/components/GeneralHeader.vue' import { ref, onMounted } from 'vue' import { setDocumentDirection } from '@/locales/i18n' +import { apiGetCashOutRecords } from '@/api/wallet' const { t, locale } = useI18n() // 监听语言变化并设置文档方向 locale.value && setDocumentDirection(locale.value) -// Cash Out 记录数据 -const cashOutRecords = ref([ +// 记录数据 +const Records = ref([ { id: 1, + type: 'cashOut', amount: 10, date: '21/10/2025 17:56', status: 'Under review', }, { id: 2, + type: 'cashOut', amount: 10, date: '21/10/2025 17:56', status: 'Approved', }, { id: 3, + type: 'cashOut', amount: 10, date: '21/10/2025 17:56', status: 'Rejection', }, -]) - -// 其他记录数据 -const otherRecords = ref([ + { + id: 7, + type: 'Transfer', + avatar: '', + name: 'asdfasdfasdfasdsfasfasfasd', + id: '1234567890', + addStatus: '1', + amount: '10000', + date: '21/10/2025 17:56', + }, { id: 4, type: 'Exchange Coins', - amount: '- $10', + addStatus: '0', + amount: '10', date: '21/10/2025 17:56', }, { id: 5, - type: "BD's income", - amount: '+ $10', + type: 'BD income', + addStatus: '1', + amount: '10', date: '21/10/2025 17:56', }, { id: 6, - type: "BD Leader's income", - amount: '+ $10', + type: 'BD Leader income', + addStatus: '1', + amount: '10', date: '21/10/2025 17:56', }, ]) @@ -214,8 +203,17 @@ const defaultAvatarUrl = (e) => { e.target.src = new URL('/src/assets/images/WeeklyStar/defaultAvatar.png', import.meta.url).href } +// 获取提现记录 +const getCashOutRecords = async () => { + const resCashOutRecords = await apiGetCashOutRecords() + console.log('已邀请列表:', resCashOutRecords) + if (resCashOutRecords.status && resCashOutRecords.body) { + // invitedUserList.value = resCashOutRecords.body + } +} + onMounted(() => { - // 这里可以添加数据获取逻辑 + getCashOutRecords() // 获取提现记录 })