This commit is contained in:
sion
2026-04-05 21:01:42 +08:00
parent e2624b845a
commit 0c66b3725f
156 changed files with 97 additions and 220731 deletions

View File

@@ -18,7 +18,7 @@ function calcGrowthRate(current: number, previous: number): string {
return current > 0 ? '+100%' : '0%'
const rate = new Decimal(current).minus(previous).div(previous).mul(100).toDecimalPlaces(1)
const sign = rate.gte(0) ? '+' : ''
return `${sign}${rate}%`
return `{sign}{rate}%`
}
// ========== 模块1: 盈利分析 ==========
@@ -161,7 +161,7 @@ const suggestions = computed(() => {
type: 'success',
icon: 'lucide:check-circle',
title: '盈利健康',
desc: `本月总收益 ¥${data.totalProfit.toFixed(2)},收益趋势良好`,
desc: `本月总收益 USDT{data.totalProfit.toFixed(2)},收益趋势良好`,
color: 'border-green-500 bg-green-50 dark:bg-green-950/20',
})
}
@@ -172,7 +172,7 @@ const suggestions = computed(() => {
type: 'warning',
icon: 'lucide:alert-circle',
title: '关注风险',
desc: `检测到 ${risk.abnormalWithdrawals} 笔异常提现申请,建议加强风控审核`,
desc: `检测到 {risk.abnormalWithdrawals} 笔异常提现申请,建议加强风控审核`,
color: 'border-yellow-500 bg-yellow-50 dark:bg-yellow-950/20',
})
}
@@ -195,10 +195,10 @@ const isLoading = computed(() => profitLoading.value || tradeLoading.value)
function formatCurrency(value: number): string {
if (!value)
return '¥0'
return 'USDT0'
if (value >= 10000)
return `¥${(value / 10000).toFixed(1)}`
return `¥${value.toLocaleString()}`
return `USDT{(value / 10000).toFixed(1)}`
return `USDT{value.toLocaleString()}`
}
</script>

View File

@@ -162,10 +162,10 @@ function formatPrice(price: number): string {
</UiTableCell>
<UiTableCell>{{ coin.name }}</UiTableCell>
<UiTableCell class="text-right font-mono text-muted-foreground">
{{ coin.initialPrice != null ? `$${formatPrice(coin.initialPrice)}` : '--' }}
{{ coin.initialPrice != null ? `${formatPrice(coin.initialPrice)} USDT` : '--' }}
</UiTableCell>
<UiTableCell class="text-right font-mono font-semibold text-green-600 dark:text-green-400">
${{ formatPrice(coin.price) }}
{{ formatPrice(coin.price) }} USDT
</UiTableCell>
<UiTableCell>
<UiBadge variant="outline">
@@ -232,10 +232,10 @@ function formatPrice(price: number): string {
</div>
<div class="mt-3 pt-3 border-t">
<div class="text-xl font-mono font-bold text-green-600 dark:text-green-400">
${{ formatPrice(coin.price) }}
{{ formatPrice(coin.price) }} USDT
</div>
<div v-if="coin.initialPrice != null" class="text-xs text-muted-foreground mt-1">
初始价格: ${{ formatPrice(coin.initialPrice) }}
初始价格: {{ formatPrice(coin.initialPrice) }} USDT
</div>
</div>
<div class="mt-3 flex gap-2">
@@ -319,7 +319,7 @@ function formatPrice(price: number): string {
</div>
<!-- 新增时设置初始价格 -->
<div v-if="editingCoin.priceType === 2 && !editingCoin.id" class="grid gap-2">
<UiLabel>初始价格 ($)</UiLabel>
<UiLabel>初始价格 (USDT)</UiLabel>
<UiInput v-model.number="editingCoin.price" type="number" step="0.000001" placeholder="0.00" />
</div>
<!-- 编辑时显示初始价格只读和当前价格只读 -->
@@ -328,13 +328,13 @@ function formatPrice(price: number): string {
<div>
<span class="text-muted-foreground">初始价格</span>
<div class="font-mono mt-1">
${{ formatPrice(editingCoin.initialPrice) }}
{{ formatPrice(editingCoin.initialPrice) }} USDT
</div>
</div>
<div>
<span class="text-muted-foreground">当前价格</span>
<div class="font-mono mt-1 text-green-600 dark:text-green-400">
${{ formatPrice(editingCoin.price) }}
{{ formatPrice(editingCoin.price) }} USDT
</div>
</div>
</div>
@@ -366,13 +366,13 @@ function formatPrice(price: number): string {
<div>
<span class="text-muted-foreground">初始价格</span>
<div class="font-mono mt-1">
${{ formatPrice(editingInitialPrice) }}
{{ formatPrice(editingInitialPrice) }} USDT
</div>
</div>
<div>
<span class="text-muted-foreground">当前价格</span>
<div class="font-mono mt-1 text-green-600 dark:text-green-400">
${{ formatPrice(editingCurrentPrice) }}
{{ formatPrice(editingCurrentPrice) }} USDT
</div>
</div>
</div>
@@ -380,7 +380,7 @@ function formatPrice(price: number): string {
首次调价后当前价格将被锁定为初始价格之后只能调整当前价格
</div>
<div class="grid gap-2">
<UiLabel>新价格 ($)</UiLabel>
<UiLabel>新价格 (USDT)</UiLabel>
<UiInput
v-model.number="priceInput"
type="number"

View File

@@ -47,7 +47,7 @@ function calcGrowthRate(current: number, previous: number): string {
return current > 0 ? '+100%' : '0%'
const rate = new Decimal(current).minus(previous).div(previous).mul(100).toDecimalPlaces(1)
const sign = rate.gte(0) ? '+' : ''
return `${sign}${rate}%`
return `{sign}{rate}%`
}
const flowMetrics = computed(() => {
@@ -105,7 +105,7 @@ const trendChartOption = computed(() => ({
},
yAxis: {
type: 'value',
axisLabel: { formatter: '¥{value}K' },
axisLabel: { formatter: 'USDT{value}K' },
},
series: [
{
@@ -158,8 +158,8 @@ const operationMetrics = computed(() => [
function formatCurrency(value: number): string {
if (value >= 10000)
return `¥${(value / 10000).toFixed(1)}`
return `¥${value.toLocaleString()}`
return `USDT{(value / 10000).toFixed(1)}`
return `USDT{value.toLocaleString()}`
}
function navigateTo(path: string) {

View File

@@ -55,12 +55,12 @@ async function handleApprove() {
adminRemark: adminRemark.value || undefined,
})
toast.success(`订单已${action}`)
toast.success(`订单已{action}`)
showApproveDialog.value = false
refetchPending()
}
catch (e: any) {
toast.error(e.message || e.response?.data?.msg || `${action}失败`)
toast.error(e.message || e.response?.data?.msg || `{action}失败`)
}
}
@@ -104,7 +104,7 @@ function copyToClipboard(text: string) {
手续费
</UiTableHead>
<UiTableHead class="text-right">
收款项
付款
</UiTableHead>
<UiTableHead>审批人</UiTableHead>
<UiTableHead class="hidden xl:table-cell">
@@ -133,13 +133,13 @@ function copyToClipboard(text: string) {
</UiTableCell>
<UiTableCell>{{ order.username }}</UiTableCell>
<UiTableCell class="text-right font-mono font-medium">
${{ formatAmount(order.amount) }}
{{ formatAmount(order.amount) }}
</UiTableCell>
<UiTableCell class="text-right font-mono text-muted-foreground">
-${{ formatAmount(order.fee || 0) }}
-{{ formatAmount(order.fee || 0) }}
</UiTableCell>
<UiTableCell class="text-right font-mono font-bold text-green-600">
${{ formatAmount(order.receivableAmount || 0) }}
{{ formatAmount(order.receivableAmount || 0) }}
</UiTableCell>
<UiTableCell class="text-sm">
{{ order.approveAdminName || '-' }}
@@ -196,10 +196,10 @@ function copyToClipboard(text: string) {
</div>
<div class="mt-3 pt-3 border-t">
<div class="text-xl font-mono font-bold text-red-600 dark:text-red-400">
-${{ formatAmount(order.amount) }}
-{{ formatAmount(order.amount) }}
</div>
<div class="text-sm text-muted-foreground mt-1">
手续费: -${{ formatAmount(order.fee || 0) }} | 实际到账: ${{ formatAmount(order.receivableAmount || 0) }}
手续费: -{{ formatAmount(order.fee || 0) }} | 实际到账: {{ formatAmount(order.receivableAmount || 0) }}
</div>
<div class="text-sm text-muted-foreground mt-1">
审批人: {{ order.approveAdminName || '-' }}
@@ -277,13 +277,13 @@ function copyToClipboard(text: string) {
<div class="col-span-2 font-medium">{{ currentOrder.username }}</div>
<div class="text-muted-foreground">提现金额</div>
<div class="col-span-2 font-mono font-bold text-lg">${{ formatAmount(currentOrder.amount) }}</div>
<div class="col-span-2 font-mono font-bold text-lg">{{ formatAmount(currentOrder.amount) }}</div>
<div class="text-muted-foreground">手续费(10%)</div>
<div class="col-span-2 font-mono">-${{ formatAmount(currentOrder.fee || 0) }}</div>
<div class="col-span-2 font-mono">-{{ formatAmount(currentOrder.fee || 0) }}</div>
<div class="text-muted-foreground">收款项</div>
<div class="col-span-2 font-mono font-bold text-green-600">${{ formatAmount(currentOrder.receivableAmount || 0) }}</div>
<div class="text-muted-foreground">付款</div>
<div class="col-span-2 font-mono font-bold text-green-600">{{ formatAmount(currentOrder.receivableAmount || 0) }}</div>
<div class="text-muted-foreground">提现地址</div>
<div class="col-span-2">
@@ -337,11 +337,11 @@ function copyToClipboard(text: string) {
</div>
<div>
<div class="text-muted-foreground">提现金额</div>
<div class="font-mono font-bold text-lg">${{ formatAmount(currentOrder.amount) }}</div>
<div class="font-mono font-bold text-lg">{{ formatAmount(currentOrder.amount) }}</div>
</div>
<div>
<div class="text-muted-foreground">收款项</div>
<div class="font-mono text-green-600">${{ formatAmount(currentOrder.receivableAmount || 0) }}</div>
<div class="text-muted-foreground">付款</div>
<div class="font-mono text-green-600">{{ formatAmount(currentOrder.receivableAmount || 0) }}</div>
</div>
</div>
<div v-if="approveStatus === 3" class="grid gap-2">

View File

@@ -88,13 +88,13 @@ async function handleApprove() {
adminRemark: adminRemark.value || undefined,
})
toast.success(`订单已${action}`)
toast.success(`订单已{action}`)
showApproveDialog.value = false
refetchPending()
if (allLoaded.value) refetchAll()
}
catch (e: any) {
toast.error(e.message || e.response?.data?.msg || `${action}失败`)
toast.error(e.message || e.response?.data?.msg || `{action}失败`)
}
}
@@ -262,7 +262,7 @@ function copyToClipboard(text: string) {
</UiBadge>
</UiTableCell>
<UiTableCell class="text-right font-mono font-medium">
¥{{ formatAmount(order.amount) }}
{{ formatAmount(order.amount) }}
</UiTableCell>
<UiTableCell>
<UiBadge :variant="getStatusVariant(order)">
@@ -342,7 +342,7 @@ function copyToClipboard(text: string) {
</div>
<div class="mt-3 pt-3 border-t">
<div class="text-xl font-mono font-bold" :class="order.type === 1 ? 'text-green-600 dark:text-green-400' : 'text-red-600 dark:text-red-400'">
{{ order.type === 1 ? '+' : '-' }}¥{{ formatAmount(order.amount) }}
{{ order.type === 1 ? '+' : '-' }}{{ formatAmount(order.amount) }}
</div>
<!-- 显示地址信息 -->
<div v-if="order.walletAddress" class="mt-2 text-sm">
@@ -495,7 +495,7 @@ function copyToClipboard(text: string) {
</UiBadge>
</UiTableCell>
<UiTableCell class="text-right font-mono">
¥{{ formatAmount(order.amount) }}
{{ formatAmount(order.amount) }}
</UiTableCell>
<UiTableCell>
<UiBadge :variant="getStatusVariant(order)">
@@ -560,7 +560,7 @@ function copyToClipboard(text: string) {
</div>
<div class="mt-3 pt-3 border-t">
<div class="text-xl font-mono font-bold">
¥{{ formatAmount(order.amount) }}
{{ formatAmount(order.amount) }}
</div>
<!-- 显示地址信息 -->
<div v-if="order.walletAddress" class="mt-2 text-sm">
@@ -608,7 +608,7 @@ function copyToClipboard(text: string) {
<div class="flex items-center gap-4">
<div class="flex items-center gap-2">
<span class="text-sm">每页</span>
<UiSelect :model-value="`${pageSize}`" @update:model-value="handlePageSizeChange">
<UiSelect :model-value="`{pageSize}`" @update:model-value="handlePageSizeChange">
<UiSelectTrigger class="h-8 w-[70px]">
<UiSelectValue />
</UiSelectTrigger>
@@ -688,7 +688,7 @@ function copyToClipboard(text: string) {
金额
</div>
<div class="col-span-2 font-mono font-bold text-lg">
¥{{ formatAmount(currentOrder.amount) }}
{{ formatAmount(currentOrder.amount) }}
</div>
<div class="text-muted-foreground">
@@ -706,7 +706,7 @@ function copyToClipboard(text: string) {
手续费(10%)
</div>
<div class="col-span-2 font-mono">
-${{ currentOrder.fee }}
-{{ currentOrder.fee }}
</div>
</template>
<template v-if="currentOrder.type === 2 && currentOrder.receivableAmount">
@@ -714,7 +714,7 @@ function copyToClipboard(text: string) {
应收款项
</div>
<div class="col-span-2 font-mono font-bold text-green-600">
${{ currentOrder.receivableAmount }}
{{ currentOrder.receivableAmount }}
</div>
</template>
@@ -870,7 +870,7 @@ function copyToClipboard(text: string) {
金额
</div>
<div class="font-mono font-bold text-lg">
¥{{ formatAmount(currentOrder.amount) }}
{{ formatAmount(currentOrder.amount) }}
</div>
</div>
<!-- 显示地址信息 -->