diff --git a/src/pages/UserCenter/DesktopLayout/index.vue b/src/pages/UserCenter/DesktopLayout/index.vue index 3eee3f0..074b21b 100644 --- a/src/pages/UserCenter/DesktopLayout/index.vue +++ b/src/pages/UserCenter/DesktopLayout/index.vue @@ -17,12 +17,23 @@
-
+
+
+ +
+
@@ -33,9 +44,12 @@ import DownloadStats from '@/pages/UserCenter/components/DownloadStats/index.vue import QuickTools from '@/pages/UserCenter/components/QuickTools/index.vue' import ProxyData from '@/pages/UserCenter/components/ProxyData/index.vue' import SalesData from '@/pages/UserCenter/components/SalesData/index.vue' +import RefundData from '@/pages/UserCenter/components/RefundData/index.vue' import OrderDetailsModal from '@/pages/UserCenter/components/OrderDetails/index.vue' +import WithdrawalLogDialog from '@/pages/UserCenter/components/UserInfo/components/WithdrawalLogDialog.vue' const orderDetailsModalRef = ref | null>(null) +const refundDetailsModalRef = ref | null>(null) diff --git a/src/pages/UserCenter/components/OrderDetails/OrderList.vue b/src/pages/UserCenter/components/OrderDetails/OrderList.vue index a873ae6..cc1cafb 100644 --- a/src/pages/UserCenter/components/OrderDetails/OrderList.vue +++ b/src/pages/UserCenter/components/OrderDetails/OrderList.vue @@ -139,7 +139,7 @@ function statusText(status: 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/ProxyData/index.vue b/src/pages/UserCenter/components/ProxyData/index.vue index 201f1c1..8204244 100644 --- a/src/pages/UserCenter/components/ProxyData/index.vue +++ b/src/pages/UserCenter/components/ProxyData/index.vue @@ -6,7 +6,7 @@
本月链接转化
-
+
-
相比前一个月 {{ growthRate }}
+
相比前一个月 {{ growthRate }}
diff --git a/src/pages/UserCenter/components/RefundData/index.vue b/src/pages/UserCenter/components/RefundData/index.vue new file mode 100644 index 0000000..bcf37a4 --- /dev/null +++ b/src/pages/UserCenter/components/RefundData/index.vue @@ -0,0 +1,94 @@ + + + diff --git a/src/pages/UserCenter/components/SalesData/index.vue b/src/pages/UserCenter/components/SalesData/index.vue index c778861..545f953 100644 --- a/src/pages/UserCenter/components/SalesData/index.vue +++ b/src/pages/UserCenter/components/SalesData/index.vue @@ -2,7 +2,7 @@
-
+
本月销售数据
本月已成交{{ salesPage.total }}单
@@ -17,10 +17,7 @@
-
+
@@ -29,14 +26,15 @@
{{ item.user_hash }} - {{ formatTime(item.update_at) }} + {{ formatTime(item.updated_at) }}
$ {{ item.amount }}
+
暂无数据
@@ -69,7 +67,7 @@ async function fetchSales() { const end_time = Math.floor(endOfMonth.getTime() / 1000) const res: any = await request.get('/api/v1/public/user/invite/sales', { page: 1, - size: 8, + size: 3, start_time, end_time, }) diff --git a/src/pages/UserCenter/components/UserInfo/components/WalletDialog.vue b/src/pages/UserCenter/components/UserInfo/components/WalletDialog.vue index d4dd8e3..f13b8bc 100644 --- a/src/pages/UserCenter/components/UserInfo/components/WalletDialog.vue +++ b/src/pages/UserCenter/components/UserInfo/components/WalletDialog.vue @@ -36,7 +36,7 @@ :value="t" class="py-3 text-sm focus:bg-[#ADFF5B] focus:text-black" > - {{ t === 'USDT(TRC20)' ? 'USDT' : t }} + {{ t }} @@ -129,7 +129,10 @@ @click="fileInputRef?.click()" > +
+ + 上传中 +
@@ -148,7 +158,7 @@
-

提现记录

+

{{ title }}

- +
@@ -38,6 +44,23 @@ import { nextTick, ref } from 'vue' import { Dialog, DialogContent } from '@/components/ui/dialog' import WithdrawalLogList from './WithdrawalLogList.vue' +withDefaults( + defineProps<{ + title?: string + bizType?: string + amountLabel?: string + emptyText?: string + showContent?: boolean + }>(), + { + title: '提现记录', + bizType: '', + amountLabel: '提现金额', + emptyText: '暂无提现记录', + showContent: false, + }, +) + const isOpen = ref(false) const logListRef = ref | null>(null) diff --git a/src/pages/UserCenter/components/UserInfo/components/WithdrawalLogList.vue b/src/pages/UserCenter/components/UserInfo/components/WithdrawalLogList.vue index c10603d..8682f53 100644 --- a/src/pages/UserCenter/components/UserInfo/components/WithdrawalLogList.vue +++ b/src/pages/UserCenter/components/UserInfo/components/WithdrawalLogList.vue @@ -10,7 +10,7 @@ v-else-if="list.length === 0" class="flex h-40 items-center justify-center text-gray-500" > - 暂无提现记录 + {{ emptyText }}
-
+
-
提现金额
+
{{ 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) }}