+
-
提现金额
+
{{ amountLabel }}
+
${{ formatAmount(item.amount) }}
+
+
+
退费时间
+
{{ formatTime(item.created_at) }}
+
+
+
说明
+
{{ item.content || '-' }}
+
+
+
+
+
{{ amountLabel }}
${{ formatAmount(item.amount) }}
@@ -94,11 +108,27 @@
import { computed, ref } from 'vue'
import request from '@/utils/request'
+const props = withDefaults(
+ defineProps<{
+ bizType?: string
+ amountLabel?: string
+ emptyText?: string
+ showContent?: boolean
+ }>(),
+ {
+ bizType: '',
+ amountLabel: '提现金额',
+ emptyText: '暂无提现记录',
+ showContent: false,
+ },
+)
+
interface WithdrawalLog {
id: number
amount: number
status: number
method: number
+ content?: string
reason?: string
created_at: number
}
@@ -117,6 +147,7 @@ async function fetchLogs() {
const res: any = await request.get('/api/v1/public/user/withdrawal_log', {
page: page.value,
size: size.value,
+ ...(props.bizType ? { biz_type: props.bizType } : {}),
})
list.value = res.list || []
total.value = res.total || 0
@@ -165,7 +196,7 @@ function formatAmount(amount: number) {
function formatTime(timestamp: number) {
if (!timestamp) return '-'
const date = new Date(timestamp > 10000000000 ? timestamp : timestamp * 1000)
- return date.toLocaleString('en-US', {
+ return date.toLocaleString('zh-CN', {
month: 'numeric',
day: 'numeric',
year: 'numeric',
diff --git a/src/pages/UserCenter/components/UserInfo/index.vue b/src/pages/UserCenter/components/UserInfo/index.vue
index ae8ca3a..ce57a8a 100644
--- a/src/pages/UserCenter/components/UserInfo/index.vue
+++ b/src/pages/UserCenter/components/UserInfo/index.vue
@@ -16,7 +16,17 @@
@@ -27,15 +37,7 @@
class="flex min-h-[90px] w-full items-center justify-between rounded-[25px] bg-[#ADFF5B] px-4 font-medium text-black"
>
-
- 佣金账户余额
-
+
佣金账户余额
$ {{ (userInfo.commission / 100 || 0).toFixed(2) }}