每周提交更新

This commit is contained in:
2026-01-23 17:00:06 +08:00
parent da223f8935
commit f34f36b507
30 changed files with 363 additions and 220 deletions

View File

@@ -7,8 +7,8 @@ NODE_ENV = production
ENV = 'staging' ENV = 'staging'
# 测试环境 # 测试环境
VUE_APP_BASE_API = 'http://10.168.2.220:8888' # VUE_APP_BASE_API = 'http://10.168.2.220:8888'
# VUE_APP_BASE_API = 'https://test.m2pool.com/api/' VUE_APP_BASE_API = 'https://test.m2pool.com/api/'
VUE_APP_BASE_URL = 'https://test.m2pool.com/' VUE_APP_BASE_URL = 'https://test.m2pool.com/'

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
</head> </head>
<body> <body>

View File

@@ -108,7 +108,7 @@ export function getPurchasedItems(data) {
}) })
} }
//已购商品详情 //挖矿信息详情
export function getPurchasedInfoV2(data) { export function getPurchasedInfoV2(data) {
return request({ return request({
url: `/lease/v2/order/info/getPurchasedInfo`, url: `/lease/v2/order/info/getPurchasedInfo`,

View File

@@ -57,7 +57,7 @@ export function getMachineInfo(data) {
} }
// 已购商品 // 挖矿信息
export function getOwnedList(data) { export function getOwnedList(data) {
return request({ return request({
url: `/lease/product/getOwnedList`, url: `/lease/product/getOwnedList`,
@@ -68,7 +68,7 @@ export function getOwnedList(data) {
// 已购商品详情 // 挖矿信息详情
export function getOwnedById(data) { export function getOwnedById(data) {
return request({ return request({
url: `/lease/product/getOwnedById`, url: `/lease/product/getOwnedById`,

View File

@@ -208,8 +208,8 @@ export const accountRoutes = [
name: 'accountPurchasedMachineConfig', name: 'accountPurchasedMachineConfig',
component: () => import('../views/account/purchasedMachineConfig.vue'), component: () => import('../views/account/purchasedMachineConfig.vue'),
meta: { meta: {
title: '已购商品', title: '挖矿信息',
description: '查看已购买商品的配置信息', description: '查看已购买的矿机配置信息',
allAuthority: ['all'] allAuthority: ['all']
} }
}, },
@@ -218,8 +218,8 @@ export const accountRoutes = [
name: 'purchasedMachineDetail', name: 'purchasedMachineDetail',
component: () => import('../views/account/purchasedMachineDetail.vue'), component: () => import('../views/account/purchasedMachineDetail.vue'),
meta: { meta: {
title: '已购商品详情', title: '挖矿信息详情',
description: '查看已购买商品的详细信息', description: '查看已购买的矿机详细信息',
allAuthority: ['all'] allAuthority: ['all']
} }
}, },

View File

@@ -10,25 +10,25 @@
<template #default="scope">{{ formatMachineType(scope.row && scope.row.type) }}</template> <template #default="scope">{{ formatMachineType(scope.row && scope.row.type) }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="payCoin" label="币种" min-width="100" /> <el-table-column prop="payCoin" label="币种" min-width="100" />
<el-table-column prop="address" label="收款地址" min-width="240" /> <!-- <el-table-column prop="address" label="收款地址" min-width="240" /> -->
<el-table-column prop="leaseTime" label="租赁天数" min-width="100" /> <el-table-column prop="leaseTime" label="租赁天数" min-width="100" />
<el-table-column label="购买数量" min-width="100"> <el-table-column label="购买数量" min-width="100">
<template #default="scope">{{ scope.row && scope.row.numbers != null ? scope.row.numbers : '—' }}</template> <template #default="scope">{{ scope.row && scope.row.numbers != null ? scope.row.numbers : '—' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="price" label="单价(USDT)" min-width="240"> <el-table-column prop="price" label="单价" min-width="240">
<template #default="scope"> <template #default="scope">
<span class="value strong"> <span class="value strong">
<el-tooltip <el-tooltip
v-if="formatAmount(scope.row.price, scope.row.payCoin || 'USDT').truncated" v-if="formatAmount(scope.row.price, scope.row.payCoin || '').truncated"
:content="formatAmount(scope.row.price, scope.row.payCoin || 'USDT').full" :content="formatAmount(scope.row.price, scope.row.payCoin || '').full + (scope.row.payCoin ? ' ' + scope.row.payCoin : '')"
placement="top" placement="top"
> >
<span> <span>
{{ formatAmount(scope.row.price, scope.row.payCoin || 'USDT').text }} {{ formatAmount(scope.row.price, scope.row.payCoin || '').text }}<span v-if="scope.row.payCoin"> {{ scope.row.payCoin }}</span>
<i class="el-icon-more amount-more"></i> <i class="el-icon-more amount-more"></i>
</span> </span>
</el-tooltip> </el-tooltip>
<span v-else>{{ formatAmount(scope.row.price, scope.row.payCoin || 'USDT').text }}</span> <span v-else>{{ formatAmount(scope.row.price, scope.row.payCoin || '').text }}<span v-if="scope.row.payCoin"> {{ scope.row.payCoin }}</span></span>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@@ -49,20 +49,20 @@
<el-table-column label="商品数" min-width="70"> <el-table-column label="商品数" min-width="70">
<template #default="scope">{{ Array.isArray(scope.row && scope.row.orderItemDtoList) ? scope.row.orderItemDtoList.length : 0 }}</template> <template #default="scope">{{ Array.isArray(scope.row && scope.row.orderItemDtoList) ? scope.row.orderItemDtoList.length : 0 }}</template>
</el-table-column> </el-table-column>
<el-table-column label="总金额(USDT)" width="120"> <el-table-column label="总金额" width="120">
<template #default="scope"> <template #default="scope">
<span class="value strong"> <span class="value strong">
<el-tooltip <el-tooltip
v-if="formatAmount(scope.row && scope.row.totalPrice, 'USDT').truncated" v-if="formatAmount(scope.row && scope.row.totalPrice, scope.row && scope.row.payCoin || '').truncated"
:content="formatAmount(scope.row && scope.row.totalPrice, 'USDT').full" :content="formatAmount(scope.row && scope.row.totalPrice, scope.row && scope.row.payCoin || '').full + (scope.row && scope.row.payCoin ? ' ' + scope.row.payCoin : '')"
placement="top" placement="top"
> >
<span> <span>
{{ formatAmount(scope.row && scope.row.totalPrice, 'USDT').text }} {{ formatAmount(scope.row && scope.row.totalPrice, scope.row && scope.row.payCoin || '').text }}<span v-if="scope.row && scope.row.payCoin"> {{ scope.row.payCoin }}</span>
<i class="el-icon-more amount-more"></i> <i class="el-icon-more amount-more"></i>
</span> </span>
</el-tooltip> </el-tooltip>
<span v-else>{{ formatAmount(scope.row && scope.row.totalPrice, 'USDT').text }}</span> <span v-else>{{ formatAmount(scope.row && scope.row.totalPrice, scope.row && scope.row.payCoin || '').text }}<span v-if="scope.row && scope.row.payCoin"> {{ scope.row.payCoin }}</span></span>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@@ -76,23 +76,23 @@
</div> </div>
<span style="display:inline-flex;align-items:center;gap:6px;"> <span style="display:inline-flex;align-items:center;gap:6px;">
<i class="el-icon-question" style="color:#909399;" aria-label="说明" role="img"></i> <i class="el-icon-question" style="color:#909399;" aria-label="说明" role="img"></i>
已支付金额(USDT) 已支付金额
</span> </span>
</el-tooltip> </el-tooltip>
</template> </template>
<template #default="scope"> <template #default="scope">
<span class="value strong"> <span class="value strong">
<el-tooltip <el-tooltip
v-if="formatAmount(scope.row && scope.row.payAmount, 'USDT').truncated" v-if="formatAmount(scope.row && scope.row.payAmount, scope.row && scope.row.payCoin || '').truncated"
:content="formatAmount(scope.row && scope.row.payAmount, 'USDT').full" :content="formatAmount(scope.row && scope.row.payAmount, scope.row && scope.row.payCoin || '').full + (scope.row && scope.row.payCoin ? ' ' + scope.row.payCoin : '')"
placement="top" placement="top"
> >
<span> <span>
{{ formatAmount(scope.row && scope.row.payAmount, 'USDT').text }} {{ formatAmount(scope.row && scope.row.payAmount, scope.row && scope.row.payCoin || '').text }}<span v-if="scope.row && scope.row.payCoin"> {{ scope.row.payCoin }}</span>
<i class="el-icon-more amount-more"></i> <i class="el-icon-more amount-more"></i>
</span> </span>
</el-tooltip> </el-tooltip>
<span v-else>{{ formatAmount(scope.row && scope.row.payAmount, 'USDT').text }}</span> <span v-else>{{ formatAmount(scope.row && scope.row.payAmount, scope.row && scope.row.payCoin || '').text }}<span v-if="scope.row && scope.row.payCoin"> {{ scope.row.payCoin }}</span></span>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@@ -129,19 +129,19 @@
<el-dialog :visible.sync="dialogVisible" width="520px" title="请扫码支付"> <el-dialog :visible.sync="dialogVisible" width="520px" title="请扫码支付">
<div style="text-align:left; margin-bottom:12px; color:#666;"> <div style="text-align:left; margin-bottom:12px; color:#666;">
<div style="margin-bottom:6px;">总金额(USDT) <div style="margin-bottom:6px;">总金额<span v-if="paymentDialog.payCoin">({{ paymentDialog.payCoin }})</span>
<b> <b>
<el-tooltip <el-tooltip
v-if="formatAmount(paymentDialog.totalPrice, 'USDT').truncated" v-if="formatAmount(paymentDialog.totalPrice, paymentDialog.payCoin || '').truncated"
:content="formatAmount(paymentDialog.totalPrice, 'USDT').full" :content="formatAmount(paymentDialog.totalPrice, paymentDialog.payCoin || '').full + (paymentDialog.payCoin ? ' ' + paymentDialog.payCoin : '')"
placement="top" placement="top"
> >
<span> <span>
{{ formatAmount(paymentDialog.totalPrice, 'USDT').text }} {{ formatAmount(paymentDialog.totalPrice, paymentDialog.payCoin || '').text }}
<i class="el-icon-more amount-more"></i> <i class="el-icon-more amount-more"></i>
</span> </span>
</el-tooltip> </el-tooltip>
<span v-else>{{ formatAmount(paymentDialog.totalPrice, 'USDT').text }}</span> <span v-else>{{ formatAmount(paymentDialog.totalPrice, paymentDialog.payCoin || '').text }}</span>
</b> </b>
</div> </div>
<div style="margin-bottom:6px;display:flex;align-items:center;gap:6px;"> <div style="margin-bottom:6px;display:flex;align-items:center;gap:6px;">
@@ -153,34 +153,34 @@
</div> </div>
<i class="el-icon-question" style="color:#909399;" aria-label="说明" role="img"></i> <i class="el-icon-question" style="color:#909399;" aria-label="说明" role="img"></i>
</el-tooltip> </el-tooltip>
<span>已支付金额(USDT)</span> <span>已支付金额<span v-if="paymentDialog.payCoin">({{ paymentDialog.payCoin }})</span></span>
<b class="value strong"> <b class="value strong">
<el-tooltip <el-tooltip
v-if="formatAmount(paymentDialog.payAmount, 'USDT').truncated" v-if="formatAmount(paymentDialog.payAmount, paymentDialog.payCoin || '').truncated"
:content="formatAmount(paymentDialog.payAmount, 'USDT').full" :content="formatAmount(paymentDialog.payAmount, paymentDialog.payCoin || '').full + (paymentDialog.payCoin ? ' ' + paymentDialog.payCoin : '')"
placement="top" placement="top"
> >
<span> <span>
{{ formatAmount(paymentDialog.payAmount, 'USDT').text }} {{ formatAmount(paymentDialog.payAmount, paymentDialog.payCoin || '').text }}
<i class="el-icon-more amount-more"></i> <i class="el-icon-more amount-more"></i>
</span> </span>
</el-tooltip> </el-tooltip>
<span v-else>{{ formatAmount(paymentDialog.payAmount, 'USDT').text }}</span> <span v-else>{{ formatAmount(paymentDialog.payAmount, paymentDialog.payCoin || '').text }}</span>
</b> </b>
</div> </div>
<div style="margin-bottom:6px;">待支付金额(USDT) <div style="margin-bottom:6px;">待支付金额<span v-if="paymentDialog.payCoin">({{ paymentDialog.payCoin }})</span>
<b class="value strong"> <b class="value strong">
<el-tooltip <el-tooltip
v-if="formatAmount(paymentDialog.noPayAmount, 'USDT').truncated" v-if="formatAmount(paymentDialog.noPayAmount, paymentDialog.payCoin || '').truncated"
:content="formatAmount(paymentDialog.noPayAmount, 'USDT').full" :content="formatAmount(paymentDialog.noPayAmount, paymentDialog.payCoin || '').full + (paymentDialog.payCoin ? ' ' + paymentDialog.payCoin : '')"
placement="top" placement="top"
> >
<span> <span>
{{ formatAmount(paymentDialog.noPayAmount, 'USDT').text }} {{ formatAmount(paymentDialog.noPayAmount, paymentDialog.payCoin || '').text }}
<i class="el-icon-more amount-more"></i> <i class="el-icon-more amount-more"></i>
</span> </span>
</el-tooltip> </el-tooltip>
<span v-else>{{ formatAmount(paymentDialog.noPayAmount, 'USDT').text }}</span> <span v-else>{{ formatAmount(paymentDialog.noPayAmount, paymentDialog.payCoin || '').text }}</span>
</b> </b>
</div> </div>
<!-- <div style="word-break:break-all;">收款地址<code>{{ orderDialog.address }}</code></div> --> <!-- <div style="word-break:break-all;">收款地址<code>{{ orderDialog.address }}</code></div> -->
@@ -225,7 +225,7 @@ export default {
payLoading: false, payLoading: false,
orderDialog: { visible: false, qrContent: '', coin: '', amount: '', address: '' }, orderDialog: { visible: false, qrContent: '', coin: '', amount: '', address: '' },
dialogVisible: false, dialogVisible: false,
paymentDialog: { totalPrice: "", payAmount: '', noPayAmount: '', img: '', } paymentDialog: { totalPrice: "", payAmount: '', noPayAmount: '', img: '', payCoin: '' }
} }
}, },
computed: { computed: {
@@ -265,7 +265,8 @@ export default {
totalPrice: row.totalPrice, totalPrice: row.totalPrice,
payAmount: row.payAmount, payAmount: row.payAmount,
noPayAmount: row.noPayAmount, noPayAmount: row.noPayAmount,
img: row.img img: row.img,
payCoin: row.payCoin || ''
} }
if (this.paymentDialog.img) { if (this.paymentDialog.img) {

View File

@@ -8,6 +8,10 @@
<el-tab-pane label="订单已完成" name="8"> <el-tab-pane label="订单已完成" name="8">
<order-list :items="orders[8]" :show-checkout="false" :show-end-time="true" :is-seller="true" empty-text="暂无已完成的订单" /> <order-list :items="orders[8]" :show-checkout="false" :show-end-time="true" :is-seller="true" empty-text="暂无已完成的订单" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="订单生成失败" name="11">
<div class="order-fail-reason">失败原因无法连接矿池导致生成订单失败</div>
<order-list :items="orders[11]" :show-checkout="false" :show-end-time="false" :is-seller="true" empty-text="暂无订单生成失败记录" />
</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
@@ -27,7 +31,7 @@ export default {
data() { data() {
return { return {
active: '7', active: '7',
orders: { 7: [], 8: [] }, orders: { 7: [], 8: [], 11: [] },
loading: false loading: false
} }
}, },
@@ -70,6 +74,7 @@ export default {
.orders-page { padding: 12px; } .orders-page { padding: 12px; }
.title { margin: 0 0 12px 0; font-weight: 600; color: #2c3e50; } .title { margin: 0 0 12px 0; font-weight: 600; color: #2c3e50; }
.empty { color: #888; padding: 24px; text-align: center; } .empty { color: #888; padding: 24px; text-align: center; }
.order-fail-reason { margin: 8px 0 12px; color: #f56c6c; font-size: 13px; }
.order-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .order-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order-card { border: 1px solid #eee; border-radius: 8px; padding: 0; background: #fff; overflow: hidden; } .order-card { border: 1px solid #eee; border-radius: 8px; padding: 0; background: #fff; overflow: hidden; }
.order-header { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px; cursor: pointer; position: relative; } .order-header { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px; cursor: pointer; position: relative; }

View File

@@ -16,16 +16,16 @@
<div class="amount"> <div class="amount">
<el-tooltip <el-tooltip
v-if="formatAmount(row.amount, row.fromSymbol).truncated" v-if="formatAmount(row.amount, row.fromSymbol).truncated"
:content="`${formatAmount(row.amount, row.fromSymbol).full} ${(row.fromSymbol || 'USDT').toUpperCase()}`" :content="`${formatAmount(row.amount, row.fromSymbol).full} ${(row.fromSymbol || '').toUpperCase()}`"
placement="top" placement="top"
> >
<span> <span>
+ {{ formatAmount(row.amount, row.fromSymbol).text }} {{ (row.fromSymbol || 'USDT').toUpperCase() }} + {{ formatAmount(row.amount, row.fromSymbol).text }} {{ (row.fromSymbol || '').toUpperCase() }}
<i class="el-icon-more amount-more"></i> <i class="el-icon-more amount-more"></i>
</span> </span>
</el-tooltip> </el-tooltip>
<span v-else> <span v-else>
+ {{ formatAmount(row.amount, row.fromSymbol).text }} {{ (row.fromSymbol || 'USDT').toUpperCase() }} + {{ formatAmount(row.amount, row.fromSymbol).text }} {{ (row.fromSymbol || '').toUpperCase() }}
</span> </span>
</div> </div>
<div class="chain">{{ formatChain(row.fromChain) }}</div> <div class="chain">{{ formatChain(row.fromChain) }}</div>
@@ -71,16 +71,16 @@
<div class="amount"> <div class="amount">
<el-tooltip <el-tooltip
v-if="formatAmount(row.amount, row.toSymbol).truncated" v-if="formatAmount(row.amount, row.toSymbol).truncated"
:content="`${formatAmount(row.amount, row.toSymbol).full} ${(row.toSymbol || 'USDT').toUpperCase()}`" :content="`${formatAmount(row.amount, row.toSymbol).full} ${(row.toSymbol || '').toUpperCase()}`"
placement="top" placement="top"
> >
<span> <span>
- {{ formatAmount(row.amount, row.toSymbol).text }} {{ (row.toSymbol || 'USDT').toUpperCase() }} - {{ formatAmount(row.amount, row.toSymbol).text }} {{ (row.toSymbol || '').toUpperCase() }}
<i class="el-icon-more amount-more"></i> <i class="el-icon-more amount-more"></i>
</span> </span>
</el-tooltip> </el-tooltip>
<span v-else> <span v-else>
- {{ formatAmount(row.amount, row.toSymbol).text }} {{ (row.toSymbol || 'USDT').toUpperCase() }} - {{ formatAmount(row.amount, row.toSymbol).text }} {{ (row.toSymbol || '').toUpperCase() }}
</span> </span>
</div> </div>
<div class="chain">{{ formatChain(row.toChain) }}</div> <div class="chain">{{ formatChain(row.toChain) }}</div>
@@ -126,16 +126,16 @@
<div class="amount"> <div class="amount">
<el-tooltip <el-tooltip
v-if="formatAmount(row.realAmount, row.fromSymbol).truncated" v-if="formatAmount(row.realAmount, row.fromSymbol).truncated"
:content="`${formatAmount(row.realAmount, row.fromSymbol).full} ${(row.fromSymbol || 'USDT').toUpperCase()}`" :content="`${formatAmount(row.realAmount, row.fromSymbol).full} ${(row.fromSymbol || '').toUpperCase()}`"
placement="top" placement="top"
> >
<span> <span>
- {{ formatAmount(row.realAmount, row.fromSymbol).text }} {{ (row.fromSymbol || 'USDT').toUpperCase() }} - {{ formatAmount(row.realAmount, row.fromSymbol).text }} {{ (row.fromSymbol || '').toUpperCase() }}
<i class="el-icon-more amount-more"></i> <i class="el-icon-more amount-more"></i>
</span> </span>
</el-tooltip> </el-tooltip>
<span v-else> <span v-else>
- {{ formatAmount(row.realAmount, row.fromSymbol).text }} {{ (row.fromSymbol || 'USDT').toUpperCase() }} - {{ formatAmount(row.realAmount, row.fromSymbol).text }} {{ (row.fromSymbol || '').toUpperCase() }}
</span> </span>
</div> </div>
<div class="chain">{{ formatChain(row.fromChain) }}</div> <div class="chain">{{ formatChain(row.fromChain) }}</div>

View File

@@ -63,7 +63,7 @@ export default {
// 买家侧导航 // 买家侧导航
buyerLinks: [ buyerLinks: [
{ label: '我的钱包', to: '/account/wallet' }, { label: '我的钱包', to: '/account/wallet' },
{ label: '已购商品', to: '/account/purchased-machine-config' }, { label: '挖矿信息', to: '/account/purchased-machine-config' },
{ label: '订单列表', to: '/account/orders' }, { label: '订单列表', to: '/account/orders' },
// { label: '充值记录', to: '/account/rechargeRecord' }, // { label: '充值记录', to: '/account/rechargeRecord' },
// { label: '提现记录', to: '/account/withdrawalHistory' }, // { label: '提现记录', to: '/account/withdrawalHistory' },

View File

@@ -354,7 +354,7 @@ export default {
}, },
/* 提现弹窗标题:如 USDT提现 */ /* 提现弹窗标题:如 USDT提现 */
withdrawDialogTitle() { withdrawDialogTitle() {
const sym = String((this.currentWithdrawRow && this.currentWithdrawRow.payCoin) || '').toUpperCase() || 'USDT' const sym = String((this.currentWithdrawRow && this.currentWithdrawRow.payCoin) || '').toUpperCase() || ''
return `${sym}提现` return `${sym}提现`
}, },
/* 提现币种(大写) */ /* 提现币种(大写) */

View File

@@ -8,7 +8,11 @@
<div class="row"><span class="label">订单号</span><span class="value mono">{{ order.orderNumber || '—' }}</span></div> <div class="row"><span class="label">订单号</span><span class="value mono">{{ order.orderNumber || '—' }}</span></div>
<div class="row"><span class="label">状态</span><span class="value">{{ getOrderStatusText(order.status) }}</span></div> <div class="row"><span class="label">状态</span><span class="value">{{ getOrderStatusText(order.status) }}</span></div>
<div class="row"><span class="label">店铺</span><span class="value">{{ order.shopName || '—' }}</span></div> <div class="row"><span class="label">店铺</span><span class="value">{{ order.shopName || '—' }}</span></div>
<div class="row"><span class="label">金额(USDT)</span><span class="value strong">{{ order.totalPrice }}</span></div> <div class="row"><span class="label">订单总价<span v-if="order.payCoin">({{ order.payCoin }})</span></span><span class="value strong">{{ order.totalPrice }}</span></div>
<div class="row"><span class="label">实际支付总金额<span v-if="order.payCoin">({{ order.payCoin }})</span></span><span class="value strong">{{ order.totalPayAmount !== null && order.totalPayAmount !== undefined ? order.totalPayAmount : '' }}</span></div>
<div class="row"><span class="label">实际算力</span><span class="value">{{ order.totalPracticalPower !== null && order.totalPracticalPower !== undefined ? order.totalPracticalPower : '' }}</span></div>
<div class="row"><span class="label">理论总算力</span><span class="value">{{ order.totalTheoryPower !== null && order.totalTheoryPower !== undefined ? order.totalTheoryPower : '' }}</span></div>
<div class="row"><span class="label">实际/理论算力比值</span><span class="value">{{ order.powerRatio !== null && order.powerRatio !== undefined ? order.powerRatio : '' }}</span></div>
<div class="row"><span class="label">创建时间</span><span class="value">{{ formatDateTime(order.createTime) }}</span></div> <div class="row"><span class="label">创建时间</span><span class="value">{{ formatDateTime(order.createTime) }}</span></div>
<div v-if="Number(order.status) === 8" class="row"><span class="label">订单完成时间:</span><span class="value">{{ formatDateTime(order.endTime) }}</span></div> <div v-if="Number(order.status) === 8" class="row"><span class="label">订单完成时间:</span><span class="value">{{ formatDateTime(order.endTime) }}</span></div>
</el-card> </el-card>
@@ -21,13 +25,24 @@
<el-table-column label="矿机类型" min-width="100"> <el-table-column label="矿机类型" min-width="100">
<template #default="scope">{{ formatMachineType(scope.row && scope.row.type) }}</template> <template #default="scope">{{ formatMachineType(scope.row && scope.row.type) }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="payCoin" label="币种" min-width="100" /> <el-table-column prop="practicalPower" label="实际算力" min-width="120" />
<el-table-column prop="theoryPower" label="理论算力" min-width="120" />
<el-table-column prop="powerRatio" label="实际/理论算力比值" min-width="160" />
<el-table-column prop="leaseTime" label="租赁天数" min-width="100" /> <el-table-column prop="leaseTime" label="租赁天数" min-width="100" />
<el-table-column label="购买数量" min-width="100"> <el-table-column label="购买数量" min-width="100">
<template #default="scope">{{ scope.row && scope.row.numbers != null ? scope.row.numbers : '—' }}</template> <template #default="scope">{{ scope.row && scope.row.numbers != null ? scope.row.numbers : '—' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="price" label="单价(USDT)" min-width="120" /> <el-table-column prop="price" label="单价" min-width="120">
<el-table-column prop="address" label="收款地址" min-width="240" /> <template #default="scope">
{{ scope.row && scope.row.price != null ? scope.row.price : '' }}<span v-if="scope.row && scope.row.payCoin"> {{ scope.row.payCoin }}</span>
</template>
</el-table-column>
<el-table-column prop="payAmount" label="实际支付金额" min-width="140">
<template #default="scope">
<span class="value strong">{{ scope.row && scope.row.payAmount != null ? scope.row.payAmount : '' }}</span><span v-if="scope.row && scope.row.payCoin"> {{ scope.row.payCoin }}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="address" label="收款地址" min-width="240" /> -->
</el-table> </el-table>
</el-card> </el-card>

View File

@@ -8,6 +8,10 @@
<el-tab-pane label="订单已完成" name="8"> <el-tab-pane label="订单已完成" name="8">
<order-list :items="orders[8]" :show-checkout="false" :show-end-time="true" empty-text="暂无已完成的订单" /> <order-list :items="orders[8]" :show-checkout="false" :show-end-time="true" empty-text="暂无已完成的订单" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="订单生成失败" name="11">
<div class="order-fail-reason">失败原因无法连接矿池导致生成订单失败</div>
<order-list :items="orders[11]" :show-checkout="false" :show-end-time="false" empty-text="暂无订单生成失败记录" />
</el-tab-pane>
<!-- <el-tab-pane label="余额不足,订单已取消" name="9"> <!-- <el-tab-pane label="余额不足,订单已取消" name="9">
<order-list :items="orders[9]" :show-checkout="false" empty-text="暂无因余额不足取消的订单" /> <order-list :items="orders[9]" :show-checkout="false" empty-text="暂无因余额不足取消的订单" />
</el-tab-pane> --> </el-tab-pane> -->
@@ -33,7 +37,7 @@ export default {
data() { data() {
return { return {
active: '7', // 默认值改为 '7'(订单进行中) active: '7', // 默认值改为 '7'(订单进行中)
orders: { 7: [], 8: [], 9: [] }, orders: { 7: [], 8: [], 9: [], 11: [] },
loading: false loading: false
} }
}, },
@@ -103,6 +107,7 @@ export default {
.orders-page { padding: 12px; } .orders-page { padding: 12px; }
.title { margin: 0 0 12px 0; font-weight: 600; color: #2c3e50; } .title { margin: 0 0 12px 0; font-weight: 600; color: #2c3e50; }
.empty { color: #888; padding: 24px; text-align: center; } .empty { color: #888; padding: 24px; text-align: center; }
.order-fail-reason { margin: 8px 0 12px; color: #f56c6c; font-size: 13px; }
.order-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .order-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order-card { border: 1px solid #eee; border-radius: 8px; padding: 0; background: #fff; overflow: hidden; } .order-card { border: 1px solid #eee; border-radius: 8px; padding: 0; background: #fff; overflow: hidden; }
.order-header { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px; cursor: pointer; position: relative; } .order-header { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px; cursor: pointer; position: relative; }

View File

@@ -205,7 +205,7 @@
<el-input <el-input
v-else v-else
v-model="form.cost" v-model="form.cost"
placeholder="请输入成本USDT" placeholder="请输入成本"
inputmode="decimal" inputmode="decimal"
@input="handleNumeric('cost')" @input="handleNumeric('cost')"
style="width: 50%" style="width: 50%"
@@ -435,7 +435,7 @@ export default {
} }
const str = String(value || ""); const str = String(value || "");
if (!str) { if (!str) {
callback(new Error("请填写机器成本USDT")); callback(new Error("请填写机器成本"));
return; return;
} }
const pattern = /^\d{1,12}(\.\d{1,2})?$/; const pattern = /^\d{1,12}(\.\d{1,2})?$/;
@@ -1046,7 +1046,7 @@ export default {
} }
const str = String(value || ""); const str = String(value || "");
if (!str) { if (!str) {
callback(new Error("请填写机器成本USDT")); callback(new Error("请填写机器成本"));
return; return;
} }
const pattern = /^\d{1,12}(\.\d{1,2})?$/; const pattern = /^\d{1,12}(\.\d{1,2})?$/;

View File

@@ -116,7 +116,7 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 矿机型号 --> <!-- 矿机型号 -->
<el-table-column prop="name" label="矿机型号" /> <el-table-column prop="name" label="矿机型号" show-overflow-tooltip/>
<!-- 理论算力附带单位 --> <!-- 理论算力附带单位 -->
<el-table-column label="理论算力" min-width="170" show-overflow-tooltip> <el-table-column label="理论算力" min-width="170" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
@@ -124,18 +124,18 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 功耗(kw/h) --> <!-- 功耗(kw/h) -->
<el-table-column label="功耗(kw/h)"> <el-table-column label="功耗(kw/h)" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<span>{{ getPowerDissText(scope.row) }}</span> <span>{{ getPowerDissText(scope.row) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 该商品总机器数量 --> <!-- 该商品总机器数量 -->
<el-table-column prop="saleNumbers" label="总机器数量" /> <el-table-column prop="saleNumbers" width="70" label="总机器数量" />
<!-- 已售数量 --> <!-- 已售数量 -->
<el-table-column prop="saleOutNumbers" label="已售数量" /> <el-table-column prop="saleOutNumbers" label="已售数量" />
<!-- 最大租赁天数 --> <!-- 最大租赁天数 -->
<el-table-column prop="maxLeaseDays" label="最大租赁天数" /> <el-table-column prop="maxLeaseDays" width="70" label="最大租赁天数" />
<!-- 售价根据选择的结算方式展示对应价格 --> <!-- 售价根据选择的结算方式展示对应价格 -->
<el-table-column> <el-table-column>
<template slot="header"> <template slot="header">
@@ -180,17 +180,17 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="miner" label="矿机编号"> <el-table-column prop="miner" label="矿机编号" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.miner || '-' }}</span> <span>{{ scope.row.miner || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="显卡型号"> <el-table-column prop="name" label="显卡型号" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.name || '-' }}</span> <span>{{ scope.row.name || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="180"> <el-table-column label="状态" width="120">
<template #default="scope"> <template #default="scope">
<div class="gpu-state"> <div class="gpu-state">
<el-switch <el-switch
@@ -208,7 +208,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="售价" min-width="300"> <el-table-column label="售价" width="220">
<template #default="scope"> <template #default="scope">
<div class="gpu-price-row"> <div class="gpu-price-row">
<div <div
@@ -224,18 +224,19 @@
placeholder="价格" placeholder="价格"
@input="handlePriceInput(scope.row, pt, $event)" @input="handlePriceInput(scope.row, pt, $event)"
@blur="handlePriceBlur(scope.row, pt)" @blur="handlePriceBlur(scope.row, pt)"
style="width: 100px"
/> />
</div> </div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="最大租赁天数" width="160"> <el-table-column label="最大租赁天数" width="80">
<template #default="scope"> <template #default="scope">
<el-input <el-input
size="small" size="small"
:value="String((updateMap[getRowId(scope.row)] && updateMap[getRowId(scope.row)].maxLeaseDays) || '')" :value="String((updateMap[getRowId(scope.row)] && updateMap[getRowId(scope.row)].maxLeaseDays) || '')"
placeholder="1-365" placeholder="1-365"
style="width: 120px"
@input="handleMaxLeaseDaysInput(scope.row, $event)" @input="handleMaxLeaseDaysInput(scope.row, $event)"
/> />
</template> </template>
@@ -1643,23 +1644,27 @@ export default {
.paytype-icon { width: 22px; height: 22px; border-radius: 4px; display: inline-block; } .paytype-icon { width: 22px; height: 22px; border-radius: 4px; display: inline-block; }
.gpu-price-row { .gpu-price-row {
/* 售价单列竖排显示,自动换行 */
display: grid; display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr)); /* 两列并排,减少单元格高度 */ grid-template-columns: 1fr;
gap: 10px 16px; gap: 10px 0;
width: 100%;
} }
.gpu-price-item { .gpu-price-item {
display: grid; display: grid;
grid-template-columns: 100px 1fr; /* 左侧标签固定宽度,右侧输入自适应 */ grid-template-columns: 96px minmax(0, 1fr); /* 左侧标签固定宽度,右侧输入自适应 */
align-items: center; align-items: center;
min-width: 0;
} }
.gpu-price-label { .gpu-price-label {
color: #666; color: #666;
white-space: nowrap; white-space: nowrap;
text-align: right; text-align: right;
padding-right: 8px; padding-right: 10px;
} }
.gpu-price-input { .gpu-price-input {
width: 100%; width: 100%;
max-width: 160px;
} }
.gpu-state { .gpu-state {
display: inline-flex; display: inline-flex;

View File

@@ -2,7 +2,7 @@
<div class="account-purchased-machine-config"> <div class="account-purchased-machine-config">
<div class="toolbar"> <div class="toolbar">
<div class="left-area"> <div class="left-area">
<h2 class="page-title">已购商品</h2> <h2 class="page-title">挖矿信息</h2>
</div> </div>
</div> </div>

View File

@@ -10,7 +10,7 @@
> >
返回 返回
</el-button> </el-button>
<h2 class="page-title">已购商品详情</h2> <h2 class="page-title">挖矿信息详情</h2>
</div> </div>
</div> </div>
@@ -83,7 +83,7 @@
<!-- 已购矿机信息列表 --> <!-- 已购矿机信息列表 -->
<el-card v-if="detailData" class="detail-card"> <el-card v-if="detailData" class="detail-card">
<div slot="header" class="card-header"> <div slot="header" class="card-header">
<span>已购矿机信息</span> <span>矿机信息</span>
</div> </div>
<el-table <el-table
:data="purchasedMachinesList" :data="purchasedMachinesList"

View File

@@ -77,21 +77,23 @@
<el-table-column label="支付时间" width="160"> <el-table-column label="支付时间" width="160">
<template #default="scope">{{ formatFullTime(scope.row.createTime) }}</template> <template #default="scope">{{ formatFullTime(scope.row.createTime) }}</template>
</el-table-column> </el-table-column>
<el-table-column label="收款金额(USDT)" width="140" align="right"> <el-table-column label="收款金额" width="140" align="right">
<template #default="scope"> <template #default="scope">
<span class="amount-green"> <span class="amount-green">
<el-tooltip <el-tooltip
v-if="formatAmount(scope.row.realAmount, scope.row.coin || scope.row.toSymbol || 'USDT').truncated" v-if="formatAmount(scope.row.realAmount, scope.row.toSymbol || scope.row.coin || '').truncated"
:content="`+${formatAmount(scope.row.realAmount, scope.row.coin || scope.row.toSymbol || 'USDT').full}`" :content="`+${formatAmount(scope.row.realAmount, scope.row.toSymbol || scope.row.coin || '').full} ${(scope.row.toSymbol || scope.row.coin || '').toUpperCase()}`"
placement="top" placement="top"
> >
<span> <span>
+{{ formatAmount(scope.row.realAmount, scope.row.coin || scope.row.toSymbol || 'USDT').text }} +{{ formatAmount(scope.row.realAmount, scope.row.toSymbol || scope.row.coin || '').text }}
{{ (scope.row.toSymbol || scope.row.coin || '').toUpperCase() }}
<i class="el-icon-more amount-more"></i> <i class="el-icon-more amount-more"></i>
</span> </span>
</el-tooltip> </el-tooltip>
<span v-else> <span v-else>
+{{ formatAmount(scope.row.realAmount, scope.row.coin || scope.row.toSymbol || 'USDT').text }} +{{ formatAmount(scope.row.realAmount, scope.row.toSymbol || scope.row.coin || '').text }}
{{ (scope.row.toSymbol || scope.row.coin || '').toUpperCase() }}
</span> </span>
</span> </span>
</template> </template>
@@ -154,32 +156,32 @@ export default {
return { return {
loading: false, loading: false,
rows: [ rows: [
{ // {
orderId: '1234567890', // orderId: '1234567890',
fromChain: 'tron', // fromChain: 'tron',
fromSymbol: 'USDT', // fromSymbol: 'USDT',
fromAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', // fromAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE',
toChain: 'tron', // toChain: 'tron',
coin: 'USDT', // coin: 'USDT',
toAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', // toAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE',
txHash: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', // txHash: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE',
status: 2, // status: 2,
updateTime: '2024-01-15 14:30:25', // updateTime: '2024-01-15 14:30:25',
realAmount: 100, // realAmount: 100,
}, // },
{ // {
orderId: '1234567890', // orderId: '1234567890',
fromChain: 'tron', // fromChain: 'tron',
fromSymbol: 'USDT', // fromSymbol: 'USDT',
fromAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', // fromAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE',
toChain: 'tron', // toChain: 'tron',
coin: 'USDT', // coin: 'USDT',
toAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', // toAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE',
txHash: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', // txHash: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE',
status: 1, // status: 1,
updateTime: '2024-01-15 14:30:25', // updateTime: '2024-01-15 14:30:25',
realAmount: 106, // realAmount: 106,
} // }
], ],
page: 1, page: 1,
pageSize: 10, pageSize: 10,

View File

@@ -30,7 +30,7 @@
<div class="item-main"> <div class="item-main">
<div class="item-left"> <div class="item-left">
<div class="amount"> <div class="amount">
{{ item.amount }} {{ item.fromSymbol || "USDT" }} {{ item.amount }} {{ item.fromSymbol || "" }}
</div> </div>
<div class="chain">{{ getChainName(item.fromChain) }}</div> <div class="chain">{{ getChainName(item.fromChain) }}</div>
</div> </div>
@@ -82,7 +82,7 @@
<div class="item-main"> <div class="item-main">
<div class="item-left"> <div class="item-left">
<div class="amount"> <div class="amount">
{{ item.amount }} {{ item.fromSymbol || "USDT" }} {{ item.amount }} {{ item.fromSymbol || "" }}
</div> </div>
<div class="chain">{{ getChainName(item.fromChain) }}</div> <div class="chain">{{ getChainName(item.fromChain) }}</div>
</div> </div>
@@ -134,7 +134,7 @@
<div class="item-main"> <div class="item-main">
<div class="item-left"> <div class="item-left">
<div class="amount"> <div class="amount">
{{ item.amount }} {{ item.fromSymbol || "USDT" }} {{ item.amount }} {{ item.fromSymbol || "" }}
</div> </div>
<div class="chain">{{ getChainName(item.fromChain) }}</div> <div class="chain">{{ getChainName(item.fromChain) }}</div>
</div> </div>
@@ -203,7 +203,7 @@
<span class="detail-label">充值金额</span> <span class="detail-label">充值金额</span>
<span class="detail-value amount" <span class="detail-value amount"
>{{ selectedItem.amount }} >{{ selectedItem.amount }}
{{ selectedItem.fromSymbol || "USDT" }}</span {{ selectedItem.fromSymbol || "" }}</span
> >
</div> </div>
<div class="detail-row"> <div class="detail-row">
@@ -306,36 +306,36 @@ export default {
// 充值记录数据 // 充值记录数据
rechargeRecords: [ rechargeRecords: [
{ // {
address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", // address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
amount: 100, // amount: 100,
fromSymbol: "USDT", // fromSymbol: "USDT",
fromChain: "tron", // fromChain: "tron",
status: 2, // status: 2,
createTime: "2024-01-15 14:30:25", // createTime: "2024-01-15 14:30:25",
id: 1, // id: 1,
txHash: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", // txHash: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
}, // },
{ // {
address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", // address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
amount: 100, // amount: 100,
fromSymbol: "USDT", // fromSymbol: "USDT",
fromChain: "tron", // fromChain: "tron",
status: 2, // status: 2,
createTime: "2024-01-15 14:30:25", // createTime: "2024-01-15 14:30:25",
id: 2, // id: 2,
txHash: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", // txHash: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
}, // },
{ // {
address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", // address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
amount: 100, // amount: 100,
fromSymbol: "USDT", // fromSymbol: "USDT",
fromChain: "tron", // fromChain: "tron",
status: 2, // status: 2,
createTime: "2024-01-15 14:30:25", // createTime: "2024-01-15 14:30:25",
id: 3, // id: 3,
txHash: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", // txHash: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
}, // },
// { // {
// address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", // address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
// amount: 100, // amount: 100,

View File

@@ -467,6 +467,7 @@
import { getBindInfo, bindGoogle, sendOpenGoogleCode,getGoogleStatus,closeStepTwo,sendCloseGoogleCode,openStepTwo } from '../../api/verification' import { getBindInfo, bindGoogle, sendOpenGoogleCode,getGoogleStatus,closeStepTwo,sendCloseGoogleCode,openStepTwo } from '../../api/verification'
import { rsaEncrypt } from '../../utils/rsaEncrypt' import { rsaEncrypt } from '../../utils/rsaEncrypt'
import { closeAccount, sendCloseAccount,sendUpdatePwdCode,updatePasswordInCenter} from '../../api/user' import { closeAccount, sendCloseAccount,sendUpdatePwdCode,updatePasswordInCenter} from '../../api/user'
import { createPasswordValidator } from '../../utils/validators/password'
export default { export default {
name: 'SecuritySettings', name: 'SecuritySettings',
data() { data() {
@@ -510,6 +511,8 @@ export default {
statusLoading: false, // 状态查询的 loading statusLoading: false, // 状态查询的 loading
step1Visible: false, step1Visible: false,
step2Visible: false, step2Visible: false,
// 仅用于步骤 1/2 的弹窗切换:防止“下一步”触发 step1 @close 后把二维码清空
step1ClosingForStepTransition: false,
closeDialogVisible: false, // 关闭双重验证弹窗 closeDialogVisible: false, // 关闭双重验证弹窗
openDialogVisible: false, // 开启双重验证弹窗 openDialogVisible: false, // 开启双重验证弹窗
deleteAccountDialogVisible: false, // 注销账号弹窗 deleteAccountDialogVisible: false, // 注销账号弹窗
@@ -682,6 +685,7 @@ export default {
mounted() { mounted() {
this.check2FAStatus() this.check2FAStatus()
this.loadUserEmail() this.loadUserEmail()
this.initChangePasswordRules()
}, },
beforeDestroy() { beforeDestroy() {
if (this.countdownTimer) { if (this.countdownTimer) {
@@ -698,6 +702,31 @@ export default {
} }
}, },
methods: { methods: {
/**
* 初始化“修改密码”表单校验规则与登录页同源createPasswordValidator
* 说明:这里在 mounted 中初始化,避免在 data() 中因 this 不可用而无法引用 methods
*/
initChangePasswordRules() {
// 空值提示按登录页一致:请输入密码
const validateNewPassword = createPasswordValidator({ emptyMessage: '请输入密码' })
this.changePasswordRules = {
emailCode: [
{ required: true, message: '请输入邮箱验证码', trigger: 'blur' },
{ min: 1, max: 10, message: '验证码长度为1-10位', trigger: 'blur' }
],
password: [
{ required: true, validator: validateNewPassword, trigger: 'blur' }
],
confirmPassword: [
{ required: true, validator: this.validateConfirmPassword, trigger: 'blur' }
],
googleCode: [
{ required: true, message: '请输入谷歌验证码', trigger: 'blur' },
{ pattern: /^\d{6}$/, message: '请输入6位数字', trigger: 'blur' }
]
}
},
/** /**
* 安全设置页敏感操作前置校验必须已开启双重验证Google Authenticator * 安全设置页敏感操作前置校验必须已开启双重验证Google Authenticator
* getGoogleStatus 返回值0 开启1 未绑定2 关闭 * getGoogleStatus 返回值0 开启1 未绑定2 关闭
@@ -1033,9 +1062,15 @@ export default {
* 只有在用户真正取消(点击取消按钮或 X时才清空 * 只有在用户真正取消(点击取消按钮或 X时才清空
*/ */
handleStep1Close() { handleStep1Close() {
// 关键:点击“下一步”时也会触发 step1 的 close 事件(因为 step1Visible=false
// 这种场景不要清空二维码,否则“上一步”回来会一直显示加载中。
if (this.step1ClosingForStepTransition) {
this.step1ClosingForStepTransition = false
return
}
// 用户真正关闭(取消 / 右上角 X清空二维码与密钥避免下次进入使用旧数据
this.qrCodeUrl = '' this.qrCodeUrl = ''
// 不清空 secretKey因为第二步提交时需要用到 this.secretKey = ''
// 如果用户点击取消,会在 handleStep2Close 中清空
}, },
/** /**
* 进入第二步 * 进入第二步
@@ -1045,6 +1080,8 @@ export default {
this.$message.warning('请先获取二维码或密钥') this.$message.warning('请先获取二维码或密钥')
return return
} }
// 标记:本次关闭 step1 是为了进入 step2不应清空二维码/密钥
this.step1ClosingForStepTransition = true
this.step1Visible = false this.step1Visible = false
this.step2Visible = true this.step2Visible = true
}, },
@@ -1241,11 +1278,14 @@ export default {
* 确认密码验证(用于表单验证规则) * 确认密码验证(用于表单验证规则)
*/ */
validateConfirmPassword(rule, value, callback) { validateConfirmPassword(rule, value, callback) {
if (!value) { const confirmVal = (value || '').trim()
const passwordVal = (this.changePasswordForm.password || '').trim()
if (!confirmVal) {
callback(new Error('请再次输入新密码')) callback(new Error('请再次输入新密码'))
return return
} }
if (value !== this.changePasswordForm.password) { if (confirmVal !== passwordVal) {
callback(new Error('两次输入的密码不一致')) callback(new Error('两次输入的密码不一致'))
return return
} }
@@ -1287,12 +1327,10 @@ export default {
this.$message.success('密码修改成功') this.$message.success('密码修改成功')
this.changePasswordDialogVisible = false this.changePasswordDialogVisible = false
this.handleChangePasswordDialogClose() this.handleChangePasswordDialogClose()
} else {
this.$message.error(res?.message || res?.msg || '修改密码失败,请检查输入信息')
} }
} catch (e) { } catch (e) {
console.error('修改密码失败', e) console.error('修改密码失败', e)
this.$message.error('修改密码失败,请稍后重试')
} finally { } finally {
this.changingPassword = false this.changingPassword = false
} }
@@ -1732,12 +1770,14 @@ export default {
gap: 6px; gap: 6px;
margin-top: 6px; margin-top: 6px;
padding: 10px 12px; padding: 10px 12px;
background: #f0f9ff; background: #f5f7ff;
border: 1px solid #b3d8ff; border-left: 3px solid #667eea;
border-radius: 4px; border-radius: 4px;
font-size: 12px; font-size: 12px;
color: #606266; color: #666;
line-height: 1.5; line-height: 1.5;
text-align: left;
box-sizing: border-box;
} }
.password-tip span { .password-tip span {

View File

@@ -11,6 +11,7 @@
</el-tabs> </el-tabs>
<!-- <!--
使用 keep-alive + 动态组件 使用 keep-alive + 动态组件
- 避免一次性挂载两个页面导致双请求 - 避免一次性挂载两个页面导致双请求
- 切换 Tab 时缓存组件状态如分页页码/展开行 - 切换 Tab 时缓存组件状态如分页页码/展开行

View File

@@ -69,8 +69,9 @@
{{ transaction.statusText || '-' }} {{ transaction.statusText || '-' }}
</el-tag> </el-tag>
</div> </div>
<div class="transaction-amount" :class="transaction.amount > 0 ? 'positive' : 'negative'"> <div class="transaction-amount" :class="transaction.amount > 0 ? 'positive' : 'negative'">
{{ transaction.amount > 0 ? '+' : '' }}{{ transaction.amountText }} USDT {{ transaction.amount > 0 ? '+' : '' }}{{ transaction.amountText }}<span v-if="transaction.coin"> {{ transaction.coin }}</span>
</div> </div>
</div> </div>
<div v-if="recentTransactions.length === 0" class="empty-state"> <div v-if="recentTransactions.length === 0" class="empty-state">
@@ -149,7 +150,7 @@
<!-- 提现对话框 --> <!-- 提现对话框 -->
<el-dialog <el-dialog
title="USDT提现" title="提现"
:visible.sync="withdrawDialogVisible" :visible.sync="withdrawDialogVisible"
width="720px" width="720px"
@close="resetWithdrawForm" @close="resetWithdrawForm"
@@ -328,7 +329,7 @@ export default {
withdrawLoading: false, withdrawLoading: false,
withdrawForm: { withdrawForm: {
toChain: 'tron', toChain: 'tron',
toSymbol: 'USDT', toSymbol: '',
amount: '', amount: '',
toAddress: '', toAddress: '',
fee: '1.00', // 默认手续费 fee: '1.00', // 默认手续费
@@ -371,7 +372,7 @@ export default {
// 币种选项(根据链动态变化) // 币种选项(根据链动态变化)
tokenOptions: { tokenOptions: {
tron: [ tron: [
{ label: 'USDT (TRC20)', value: 'USDT' }, // { label: 'USDT (TRC20)', value: 'USDT' },
// { label: 'TRX', value: 'TRX' } // { label: 'TRX', value: 'TRX' }
], ],
// ethereum: [ // ethereum: [
@@ -602,7 +603,9 @@ export default {
time: this.formatApiTime(r && r.updateTime), time: this.formatApiTime(r && r.updateTime),
status, status,
statusText: statusTextMap[status] || '-', statusText: statusTextMap[status] || '-',
statusTagType: statusTagTypeMap[status] || 'info' statusTagType: statusTagTypeMap[status] || 'info',
// 接口返回币种字段:为空则不展示单位
coin: (r && r.coin != null) ? String(r.coin).toUpperCase() : ''
} }
}) })
this.recentTransactions = mapped this.recentTransactions = mapped
@@ -874,7 +877,7 @@ export default {
// 创建img元素显示base64二维码 // 创建img元素显示base64二维码
const img = document.createElement('img') const img = document.createElement('img')
img.src = `data:image/png;base64,${this.WalletData.qrcode}` img.src = `data:image/png;base64,${this.WalletData.qrcode}`
img.alt = 'USDT充值二维码' img.alt = '充值二维码'
img.style.width = '160px' img.style.width = '160px'
img.style.height = '160px' img.style.height = '160px'
img.style.borderRadius = '4px' img.style.borderRadius = '4px'
@@ -1032,7 +1035,7 @@ export default {
resetWithdrawForm() { resetWithdrawForm() {
this.withdrawForm = { this.withdrawForm = {
toChain: 'tron', toChain: 'tron',
toSymbol: 'USDT', toSymbol: '',
amount: '', amount: '',
toAddress: '', toAddress: '',
fee: '1.00', fee: '1.00',
@@ -1060,24 +1063,11 @@ export default {
return return
} }
// 手续费与总需求按相同精度计算 // 手续费按相同精度计算(仅用于“实际到账>0”等校验不参与上限判断
const feeInt = this.toScaledInt(this.withdrawForm.fee) const feeInt = this.toScaledInt(this.withdrawForm.fee)
const totalRequired = amountInt + feeInt
// 钱包总余额(可用余额 + 冻结余额)
const availableBalance = this.WalletData && (this.WalletData.walletBalance || this.WalletData.balance) || 0
const blockedBalance = this.WalletData && (this.WalletData.blockedBalance || 0) || 0
const totalBalance = parseFloat(availableBalance) + parseFloat(blockedBalance)
const totalBalanceInt = this.toScaledInt(totalBalance)
// 提现金额可以等于可用余额,但提现金额+手续费不能超过钱包总余额
if (totalRequired > totalBalanceInt) {
const totalText = this.formatDec6FromInt(totalRequired)
callback(new Error(`提现金额加上手续费(${totalText} ${this.displayWithdrawSymbol})不能超过钱包余额`))
return
}
// 可用余额(用于判断提现金额是否超过可用余额) // 可用余额(用于判断提现金额是否超过可用余额)
const availableBalance = this.WalletData && (this.WalletData.walletBalance || this.WalletData.balance) || 0
const availableBalanceInt = this.toScaledInt(availableBalance) const availableBalanceInt = this.toScaledInt(availableBalance)
// 允许提现金额等于可用余额,但不能大于 // 允许提现金额等于可用余额,但不能大于
if (amountInt > availableBalanceInt) { if (amountInt > availableBalanceInt) {
@@ -1088,7 +1078,7 @@ export default {
// 检查最小提现金额 // 检查最小提现金额
// 最小提现金额 1 USDT // 最小提现金额 1 USDT
if (amountInt < 1000000) { if (amountInt < 1000000) {
callback(new Error('最小提现金额为1 USDT')) callback(new Error('最小提现金额为1'))
return return
} }

View File

@@ -28,24 +28,24 @@
<template #default="scope"> <template #default="scope">
<span class="amount-red"> <span class="amount-red">
<el-tooltip <el-tooltip
v-if="formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || 'USDT').truncated" v-if="formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || '').truncated"
:content="`-${formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || 'USDT').full}`" :content="`-${formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || '').full}`"
placement="top" placement="top"
> >
<span> <span>
-{{ formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || 'USDT').text }} -{{ formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || '').text }}
<i class="el-icon-more amount-more"></i> <i class="el-icon-more amount-more"></i>
</span> </span>
</el-tooltip> </el-tooltip>
<span v-else> <span v-else>
-{{ formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || 'USDT').text }} -{{ formatAmount(scope.row.amount, scope.row.coin || scope.row.toSymbol || '').text }}
</span> </span>
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="手续费" width="70" show-overflow-tooltip align="right"> <el-table-column label="手续费" width="70" show-overflow-tooltip align="right">
<template #default="scope"> <template #default="scope">
<span class="mono">{{ formatAmount(scope.row.serviceCharge, scope.row.coin || scope.row.toSymbol || 'USDT').text }}</span> <span class="mono">{{ formatAmount(scope.row.serviceCharge, scope.row.coin || scope.row.toSymbol || '').text }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="提现链" width="100" show-overflow-tooltip> <el-table-column label="提现链" width="100" show-overflow-tooltip>
@@ -54,20 +54,37 @@
<el-table-column label="币种" width="80" show-overflow-tooltip> <el-table-column label="币种" width="80" show-overflow-tooltip>
<template #default="scope">{{ String(scope.row.coin || scope.row.toSymbol || '').toUpperCase() }}</template> <template #default="scope">{{ String(scope.row.coin || scope.row.toSymbol || '').toUpperCase() }}</template>
</el-table-column> </el-table-column>
<el-table-column label="收款地址" min-width="320" show-overflow-tooltip> <el-table-column label="收款地址" min-width="320">
<template #default="scope"> <template #default="scope">
<!--/** 收款地址:文本可省略,按钮优先显示 */-->
<div class="address-cell">
<el-tooltip :content="scope.row.toAddress" placement="top"> <el-tooltip :content="scope.row.toAddress" placement="top">
<span class="mono-ellipsis">{{ scope.row.toAddress }}</span> <span class="mono-ellipsis address-text">{{ scope.row.toAddress }}</span>
</el-tooltip> </el-tooltip>
<el-button type="text" size="mini" @click.stop="copy(scope.row.toAddress)">复制</el-button> <el-button
type="text"
size="mini"
class="address-copy"
@click.stop="copy(scope.row.toAddress)"
>复制</el-button>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="交易HASH" width="300" show-overflow-tooltip> <el-table-column label="交易HASH" width="300">
<template #default="scope"> <template #default="scope">
<!--/** 交易HASH文本可省略按钮优先显示 */-->
<div class="hash-cell">
<el-tooltip :content="scope.row.txHash" placement="top"> <el-tooltip :content="scope.row.txHash" placement="top">
<span class="mono-ellipsis">{{ scope.row.txHash }}</span> <span class="mono-ellipsis hash-text">{{ scope.row.txHash }}</span>
</el-tooltip> </el-tooltip>
<el-button type="text" size="mini" @click.stop="copy(scope.row.txHash)" v-if="scope.row.txHash">复制</el-button> <el-button
v-if="scope.row.txHash"
type="text"
size="mini"
class="hash-copy"
@click.stop="copy(scope.row.txHash)"
>复制</el-button>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="90"> <el-table-column label="状态" width="90">
@@ -82,7 +99,7 @@
</div> </div>
<div v-if="!rows.length" class="empty"> <div v-if="!rows.length" class="empty">
<div class="empty-icon">🏧</div> <!-- <div class="empty-icon">🏧</div> -->
<div class="empty-text">暂无提现记录</div> <div class="empty-text">暂无提现记录</div>
</div> </div>
@@ -111,6 +128,33 @@ export default {
return { return {
loading: false, loading: false,
rows: [], rows: [],
/** 是否启用模拟数据,仅用于页面展示 */
useMockRows: false,
/** 模拟数据集合 */
mockRows: [
{
createTime: '2026-01-23T09:12:30.000Z',
amount: '1289.12345678',
serviceCharge: '1.23',
toChain: 'ethereum',
coin: 'usdt',
toAddress: '0x2c1f3C6c9F0a2D7b8e9fA1b2C3D4e5F67890aBcD9f7a3d1c0b5e6f8a9c0d1e2f3a4b5c6d7e8f9012',
txHash: '0x9f7a3d1c0b5e6f8a9c0d1e2f3a4b5c6d7e8f90123456789abcdef1234567890',
status: 2,
updateTime: '2026-01-23T10:18:45.000Z'
},
{
createTime: '2026-01-22T15:06:12.000Z',
amount: '56.78',
serviceCharge: '0.12',
toChain: 'tron',
coin: 'usdt',
toAddress: 'TYD4xXGZf6hRk8JQ2q4mE3s9J8zY6pU2qA7q9s8d7f6g5h4j3k2l1zXcVbN',
txHash: '0xabc123def456',
status: 1,
updateTime: '2026-01-22T15:20:00.000Z'
}
],
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 20,
total: 0 total: 0
@@ -163,6 +207,13 @@ export default {
async fetchList() { async fetchList() {
this.loading = true this.loading = true
try { try {
if (this.useMockRows) {
// eslint-disable-next-line no-console
console.info('[withdrawRecord] 使用模拟数据展示效果')
this.rows = Array.isArray(this.mockRows) ? this.mockRows : []
this.total = this.rows.length
return
}
const res = await balanceWithdrawListV2({ pageNum: this.pageNum, pageSize: this.pageSize }) const res = await balanceWithdrawListV2({ pageNum: this.pageNum, pageSize: this.pageSize })
const data = res && (res.data || res) const data = res && (res.data || res)
const list = Array.isArray(data && data.rows) ? data.rows : (Array.isArray(data) ? data : []) const list = Array.isArray(data && data.rows) ? data.rows : (Array.isArray(data) ? data : [])
@@ -197,5 +248,17 @@ export default {
.amount-red { color: #ef4444; font-weight: 700; } .amount-red { color: #ef4444; font-weight: 700; }
.mono-ellipsis { font-family: "Monaco", "Menlo", monospace; max-width: 360px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; } .mono-ellipsis { font-family: "Monaco", "Menlo", monospace; max-width: 360px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.pagination { display: flex; justify-content: flex-end; margin-top: 8px; } .pagination { display: flex; justify-content: flex-end; margin-top: 8px; }
/** 交易HASH列文本省略按钮优先显示窄屏隐藏文本 */
.hash-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hash-text { flex: 1 1 auto; min-width: 0; }
.hash-copy { flex: 0 0 auto; }
/** 收款地址列:文本省略,按钮优先显示,窄屏隐藏文本 */
.address-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.address-text { flex: 1 1 auto; min-width: 0; }
.address-copy { flex: 0 0 auto; }
@media (max-width: 1200px) {
.hash-text { display: none; }
.address-text { display: none; }
}
</style> </style>

View File

@@ -75,7 +75,7 @@
> >
<div class="item-main"> <div class="item-main">
<div class="item-left"> <div class="item-left">
<div class="amount">{{ item.amount }} {{ item.toSymbol || 'USDT' }}</div> <div class="amount">{{ item.amount }} {{ item.toSymbol || '' }}</div>
<div class="chain">{{ getChainName(item.toChain) }}</div> <div class="chain">{{ getChainName(item.toChain) }}</div>
</div> </div>
<div class="item-right"> <div class="item-right">
@@ -123,7 +123,7 @@
> >
<div class="item-main"> <div class="item-main">
<div class="item-left"> <div class="item-left">
<div class="amount">{{ item.amount }} {{ item.toSymbol || 'USDT' }}</div> <div class="amount">{{ item.amount }} {{ item.toSymbol || '' }}</div>
<div class="chain">{{ getChainName(item.toChain) }}</div> <div class="chain">{{ getChainName(item.toChain) }}</div>
</div> </div>
<div class="item-right"> <div class="item-right">
@@ -190,7 +190,7 @@
</div> </div>
<div class="detail-row"> <div class="detail-row">
<span class="detail-label">提现金额</span> <span class="detail-label">提现金额</span>
<span class="detail-value amount">{{ selectedItem.amount }} {{ selectedItem.toSymbol || 'USDT' }}</span> <span class="detail-value amount">{{ selectedItem.amount }} {{ selectedItem.toSymbol || '' }}</span>
</div> </div>
<div class="detail-row"> <div class="detail-row">
<span class="detail-label">区块链网络</span> <span class="detail-label">区块链网络</span>

View File

@@ -158,7 +158,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="price" width="120"> <el-table-column prop="price" width="120">
<template #header>单价({{ getSelectedCoinSymbolForShop(shopScope.row) || 'USDT' }}</template> <template #header>单价({{ getSelectedCoinSymbolForShop(shopScope.row) || '' }}</template>
<template #default="scope"> <template #default="scope">
<template v-if="getMachineUnitPriceBySelection(shopScope.row, scope.row) != null"> <template v-if="getMachineUnitPriceBySelection(shopScope.row, scope.row) != null">
<span class="price-strong"> <span class="price-strong">
@@ -188,7 +188,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column min-width="120"> <el-table-column min-width="120">
<template #header>机器总价({{ getSelectedCoinSymbolForShop(shopScope.row) || 'USDT' }}</template> <template #header>机器总价({{ getSelectedCoinSymbolForShop(shopScope.row) || '' }}</template>
<template #default="scope"> <template #default="scope">
<template v-if="getMachineUnitPriceBySelection(shopScope.row, scope.row) != null"> <template v-if="getMachineUnitPriceBySelection(shopScope.row, scope.row) != null">
<span class="price-strong"> <span class="price-strong">
@@ -354,7 +354,7 @@
<el-table-column prop="id" label="机器ID" min-width="160" /> <el-table-column prop="id" label="机器ID" min-width="160" />
<el-table-column prop="algorithm" label="最大收益算法" min-width="140" /> <el-table-column prop="algorithm" label="最大收益算法" min-width="140" />
<el-table-column prop="unitPrice" min-width="140"> <el-table-column prop="unitPrice" min-width="140">
<template #header>单价({{ grp.coinSymbol || 'USDT' }}</template> <template #header>单价({{ grp.coinSymbol || '' }}</template>
<template #default="scope"> <template #default="scope">
<span class="price-strong"> <span class="price-strong">
<el-tooltip <el-tooltip
@@ -374,7 +374,7 @@
<el-table-column prop="leaseTime" label="租赁天数" min-width="120" /> <el-table-column prop="leaseTime" label="租赁天数" min-width="120" />
<el-table-column prop="numbers" label="购买数量" min-width="120" /> <el-table-column prop="numbers" label="购买数量" min-width="120" />
<el-table-column prop="subtotal" min-width="140"> <el-table-column prop="subtotal" min-width="140">
<template #header>小计({{ grp.coinSymbol || 'USDT' }}</template> <template #header>小计({{ grp.coinSymbol || '' }}</template>
<template #default="scope"> <template #default="scope">
<span class="price-strong"> <span class="price-strong">
<el-tooltip <el-tooltip
@@ -2391,26 +2391,16 @@ export default {
} }
this.$set(machine, '_workerId', filtered) this.$set(machine, '_workerId', filtered)
}, },
// 钱包地址输入过滤中文限制长度26-95 // 钱包地址输入:仅过滤中文字符(不做其它格式校验
handleWalletAddressInput(val) { handleWalletAddressInput(val) {
if (!val) { if (!val) {
this.$set(this.configDialog, 'walletAddress', '') this.$set(this.configDialog, 'walletAddress', '')
return return
} }
// 过滤中文和特殊字符,只保留英文、数字和常见符号(如-、_等 // 仅去除中文字符(含常见全角/中文符号范围),其他字符原样保留
// 使用 Unicode 范围匹配中文字符和其他非ASCII字符避免使用控制字符 const input = String(val)
let filtered = val.replace(/[^\u0020-\u007E]/g, '') // 移除所有非ASCII字符包括中文只保留可打印ASCII字符 const filtered = input.replace(/[\u4e00-\u9fa5\u3400-\u4dbf\u3000-\u303f\uff00-\uffef]/g, '')
// 只允许字母、数字、连字符、下划线
filtered = filtered.replace(/[^a-zA-Z0-9\-_]/g, '')
// 限制最大长度95
if (filtered.length > 95) {
filtered = filtered.substring(0, 95)
}
this.$set(this.configDialog, 'walletAddress', filtered) this.$set(this.configDialog, 'walletAddress', filtered)
// 如果过滤后长度小于26提示但不阻止输入
if (filtered.length > 0 && filtered.length < 26) {
// 可以在这里添加提示,但为了不打断用户输入,暂时不提示
}
// 强制触发视图更新 // 强制触发视图更新
this.$nextTick(() => { this.$nextTick(() => {
this.$forceUpdate() this.$forceUpdate()

View File

@@ -180,6 +180,25 @@ export default {
} }
}, },
methods: { methods: {
/**
* 判断是否为“最大日收益”相关列,用于避免强制拼接 USDT 单位
* @param {Object} col
* @returns {boolean}
*/
isMaxDailyIncomeColumn(col) {
try {
if (!col) return false
const label = String(col.label || '')
const key = String(col.key || '').toLowerCase()
if (label.includes('最大日收益') || label.includes('最大日收入')) return true
if (key.includes('maxday') || key.includes('maxdaily')) return true
if (key.includes('dayincome') || key.includes('dailyincome')) return true
if (key.includes('dayprofit') || key.includes('dailyprofit')) return true
return false
} catch (e) {
return false
}
},
// 动态表格单元格格式化(金额/算力/天数/文本)- 统一最多显示6位小数hover展示完整 // 动态表格单元格格式化(金额/算力/天数/文本)- 统一最多显示6位小数hover展示完整
formatDynamicCell(row, col) { formatDynamicCell(row, col) {
try{ try{
@@ -209,6 +228,9 @@ export default {
const colCurrency = (col.currency || '').toString().toUpperCase() const colCurrency = (col.currency || '').toString().toUpperCase()
if (colCurrency === 'USDT') { if (colCurrency === 'USDT') {
const t = truncateTo6(val) const t = truncateTo6(val)
if (this.isMaxDailyIncomeColumn(col)) {
return { text: t.text, full: t.full, truncated: t.truncated }
}
return { text: `${t.text} USDT`, full: `${t.full} USDT`, truncated: t.truncated } return { text: `${t.text} USDT`, full: `${t.full} USDT`, truncated: t.truncated }
} }
// 兜底:不再使用 meta 的货币符号,直接返回数值 // 兜底:不再使用 meta 的货币符号,直接返回数值

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>power_leasing</title><script defer="defer" src="/js/chunk-vendors.92ffcf12.js"></script><script defer="defer" src="/js/app.b471bca6.js"></script><link href="/css/chunk-vendors.10dd4e95.css" rel="stylesheet"><link href="/css/app.9ce7bea6.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but power_leasing doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html> <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>power_leasing</title><script defer="defer" src="/js/chunk-vendors.92ffcf12.js"></script><script defer="defer" src="/js/app.d58df3d3.js"></script><link href="/css/chunk-vendors.10dd4e95.css" rel="stylesheet"><link href="/css/app.954338a1.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but power_leasing doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long