From f34f36b507696d801c4a049ba860913c0ac45049 Mon Sep 17 00:00:00 2001 From: yaoqin <497681109@qq.com> Date: Fri, 23 Jan 2026 17:00:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E5=91=A8=E6=8F=90=E4=BA=A4=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- power_leasing/.env.staging | 4 +- power_leasing/public/index.html | 2 +- power_leasing/src/api/order.js | 2 +- power_leasing/src/api/products.js | 4 +- power_leasing/src/router/routes.js | 8 +- power_leasing/src/views/account/OrderList.vue | 67 ++++++------ .../src/views/account/SellerOrders.vue | 7 +- power_leasing/src/views/account/fundsFlow.vue | 18 ++-- power_leasing/src/views/account/index.vue | 2 +- power_leasing/src/views/account/myShops.vue | 2 +- .../src/views/account/orderDetail.vue | 27 +++-- power_leasing/src/views/account/orders.vue | 7 +- .../src/views/account/productMachineAdd.vue | 6 +- power_leasing/src/views/account/products.vue | 33 +++--- .../views/account/purchasedMachineConfig.vue | 2 +- .../views/account/purchasedMachineDetail.vue | 4 +- .../src/views/account/receiptRecord.vue | 64 ++++++------ .../src/views/account/rechargeRecord.vue | 68 ++++++------- .../src/views/account/securitySettings.vue | 62 ++++++++++-- .../src/views/account/sellerFundsFlow.vue | 1 + power_leasing/src/views/account/wallet.vue | 38 +++---- .../src/views/account/withdrawRecord.vue | 95 +++++++++++++++--- .../src/views/account/withdrawalHistory.vue | 6 +- power_leasing/src/views/cart/index.vue | 26 ++--- .../src/views/productDetail/index.js | 22 ++++ power_leasing/test.zip | Bin 2091527 -> 2094360 bytes power_leasing/test/css/app.954338a1.css | 1 + power_leasing/test/index.html | 2 +- power_leasing/test/js/app.d58df3d3.js | 2 + power_leasing/test/js/app.d58df3d3.js.map | 1 + 30 files changed, 363 insertions(+), 220 deletions(-) create mode 100644 power_leasing/test/css/app.954338a1.css create mode 100644 power_leasing/test/js/app.d58df3d3.js create mode 100644 power_leasing/test/js/app.d58df3d3.js.map diff --git a/power_leasing/.env.staging b/power_leasing/.env.staging index 8ad7e3f..b305d1b 100644 --- a/power_leasing/.env.staging +++ b/power_leasing/.env.staging @@ -7,8 +7,8 @@ NODE_ENV = production ENV = 'staging' # 测试环境 - VUE_APP_BASE_API = 'http://10.168.2.220:8888' -# VUE_APP_BASE_API = 'https://test.m2pool.com/api/' +# VUE_APP_BASE_API = 'http://10.168.2.220:8888' +VUE_APP_BASE_API = 'https://test.m2pool.com/api/' VUE_APP_BASE_URL = 'https://test.m2pool.com/' diff --git a/power_leasing/public/index.html b/power_leasing/public/index.html index 3e5a139..5202962 100644 --- a/power_leasing/public/index.html +++ b/power_leasing/public/index.html @@ -4,7 +4,7 @@ - + <%= htmlWebpackPlugin.options.title %> diff --git a/power_leasing/src/api/order.js b/power_leasing/src/api/order.js index ecbc093..af7e441 100644 --- a/power_leasing/src/api/order.js +++ b/power_leasing/src/api/order.js @@ -108,7 +108,7 @@ export function getPurchasedItems(data) { }) } -//已购商品详情 +//挖矿信息详情 export function getPurchasedInfoV2(data) { return request({ url: `/lease/v2/order/info/getPurchasedInfo`, diff --git a/power_leasing/src/api/products.js b/power_leasing/src/api/products.js index 4644e47..e9ddf7f 100644 --- a/power_leasing/src/api/products.js +++ b/power_leasing/src/api/products.js @@ -57,7 +57,7 @@ export function getMachineInfo(data) { } -// 已购商品 +// 挖矿信息 export function getOwnedList(data) { return request({ url: `/lease/product/getOwnedList`, @@ -68,7 +68,7 @@ export function getOwnedList(data) { -// 已购商品详情 +// 挖矿信息详情 export function getOwnedById(data) { return request({ url: `/lease/product/getOwnedById`, diff --git a/power_leasing/src/router/routes.js b/power_leasing/src/router/routes.js index 7cf77e8..1d4e881 100644 --- a/power_leasing/src/router/routes.js +++ b/power_leasing/src/router/routes.js @@ -208,8 +208,8 @@ export const accountRoutes = [ name: 'accountPurchasedMachineConfig', component: () => import('../views/account/purchasedMachineConfig.vue'), meta: { - title: '已购商品', - description: '查看已购买商品的配置信息', + title: '挖矿信息', + description: '查看已购买的矿机配置信息', allAuthority: ['all'] } }, @@ -218,8 +218,8 @@ export const accountRoutes = [ name: 'purchasedMachineDetail', component: () => import('../views/account/purchasedMachineDetail.vue'), meta: { - title: '已购商品详情', - description: '查看已购买商品的详细信息', + title: '挖矿信息详情', + description: '查看已购买的矿机详细信息', allAuthority: ['all'] } }, diff --git a/power_leasing/src/views/account/OrderList.vue b/power_leasing/src/views/account/OrderList.vue index 6ce1fcc..31a6b5d 100644 --- a/power_leasing/src/views/account/OrderList.vue +++ b/power_leasing/src/views/account/OrderList.vue @@ -10,25 +10,25 @@ - + - + @@ -49,20 +49,20 @@ - + @@ -76,23 +76,23 @@ - 已支付金额(USDT) + 已支付金额 @@ -129,19 +129,19 @@
-
总金额(USDT): +
总金额({{ paymentDialog.payCoin }}) - {{ formatAmount(paymentDialog.totalPrice, 'USDT').text }} + {{ formatAmount(paymentDialog.totalPrice, paymentDialog.payCoin || '').text }} - {{ formatAmount(paymentDialog.totalPrice, 'USDT').text }} + {{ formatAmount(paymentDialog.totalPrice, paymentDialog.payCoin || '').text }}
@@ -153,34 +153,34 @@
- 已支付金额(USDT): + 已支付金额({{ paymentDialog.payCoin }}) - {{ formatAmount(paymentDialog.payAmount, 'USDT').text }} + {{ formatAmount(paymentDialog.payAmount, paymentDialog.payCoin || '').text }} - {{ formatAmount(paymentDialog.payAmount, 'USDT').text }} + {{ formatAmount(paymentDialog.payAmount, paymentDialog.payCoin || '').text }}
-
待支付金额(USDT): +
待支付金额({{ paymentDialog.payCoin }}) - {{ formatAmount(paymentDialog.noPayAmount, 'USDT').text }} + {{ formatAmount(paymentDialog.noPayAmount, paymentDialog.payCoin || '').text }} - {{ formatAmount(paymentDialog.noPayAmount, 'USDT').text }} + {{ formatAmount(paymentDialog.noPayAmount, paymentDialog.payCoin || '').text }}
@@ -225,7 +225,7 @@ export default { payLoading: false, orderDialog: { visible: false, qrContent: '', coin: '', amount: '', address: '' }, dialogVisible: false, - paymentDialog: { totalPrice: "", payAmount: '', noPayAmount: '', img: '', } + paymentDialog: { totalPrice: "", payAmount: '', noPayAmount: '', img: '', payCoin: '' } } }, computed: { @@ -265,7 +265,8 @@ export default { totalPrice: row.totalPrice, payAmount: row.payAmount, noPayAmount: row.noPayAmount, - img: row.img + img: row.img, + payCoin: row.payCoin || '' } if (this.paymentDialog.img) { diff --git a/power_leasing/src/views/account/SellerOrders.vue b/power_leasing/src/views/account/SellerOrders.vue index 5d18cea..6c4fafb 100644 --- a/power_leasing/src/views/account/SellerOrders.vue +++ b/power_leasing/src/views/account/SellerOrders.vue @@ -8,6 +8,10 @@ + +
失败原因:无法连接矿池,导致生成订单失败
+ +
@@ -27,7 +31,7 @@ export default { data() { return { active: '7', - orders: { 7: [], 8: [] }, + orders: { 7: [], 8: [], 11: [] }, loading: false } }, @@ -70,6 +74,7 @@ export default { .orders-page { padding: 12px; } .title { margin: 0 0 12px 0; font-weight: 600; color: #2c3e50; } .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-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; } diff --git a/power_leasing/src/views/account/fundsFlow.vue b/power_leasing/src/views/account/fundsFlow.vue index 90ac568..03534d7 100644 --- a/power_leasing/src/views/account/fundsFlow.vue +++ b/power_leasing/src/views/account/fundsFlow.vue @@ -16,16 +16,16 @@
- + {{ formatAmount(row.amount, row.fromSymbol).text }} {{ (row.fromSymbol || 'USDT').toUpperCase() }} + + {{ formatAmount(row.amount, row.fromSymbol).text }} {{ (row.fromSymbol || '').toUpperCase() }} - + {{ formatAmount(row.amount, row.fromSymbol).text }} {{ (row.fromSymbol || 'USDT').toUpperCase() }} + + {{ formatAmount(row.amount, row.fromSymbol).text }} {{ (row.fromSymbol || '').toUpperCase() }}
{{ formatChain(row.fromChain) }}
@@ -71,16 +71,16 @@
- - {{ formatAmount(row.amount, row.toSymbol).text }} {{ (row.toSymbol || 'USDT').toUpperCase() }} + - {{ formatAmount(row.amount, row.toSymbol).text }} {{ (row.toSymbol || '').toUpperCase() }} - - {{ formatAmount(row.amount, row.toSymbol).text }} {{ (row.toSymbol || 'USDT').toUpperCase() }} + - {{ formatAmount(row.amount, row.toSymbol).text }} {{ (row.toSymbol || '').toUpperCase() }}
{{ formatChain(row.toChain) }}
@@ -126,16 +126,16 @@
- - {{ formatAmount(row.realAmount, row.fromSymbol).text }} {{ (row.fromSymbol || 'USDT').toUpperCase() }} + - {{ formatAmount(row.realAmount, row.fromSymbol).text }} {{ (row.fromSymbol || '').toUpperCase() }} - - {{ formatAmount(row.realAmount, row.fromSymbol).text }} {{ (row.fromSymbol || 'USDT').toUpperCase() }} + - {{ formatAmount(row.realAmount, row.fromSymbol).text }} {{ (row.fromSymbol || '').toUpperCase() }}
{{ formatChain(row.fromChain) }}
diff --git a/power_leasing/src/views/account/index.vue b/power_leasing/src/views/account/index.vue index 204a98a..2613d74 100644 --- a/power_leasing/src/views/account/index.vue +++ b/power_leasing/src/views/account/index.vue @@ -63,7 +63,7 @@ export default { // 买家侧导航 buyerLinks: [ { label: '我的钱包', to: '/account/wallet' }, - { label: '已购商品', to: '/account/purchased-machine-config' }, + { label: '挖矿信息', to: '/account/purchased-machine-config' }, { label: '订单列表', to: '/account/orders' }, // { label: '充值记录', to: '/account/rechargeRecord' }, // { label: '提现记录', to: '/account/withdrawalHistory' }, diff --git a/power_leasing/src/views/account/myShops.vue b/power_leasing/src/views/account/myShops.vue index 658c5d6..e4db544 100644 --- a/power_leasing/src/views/account/myShops.vue +++ b/power_leasing/src/views/account/myShops.vue @@ -354,7 +354,7 @@ export default { }, /* 提现弹窗标题:如 USDT提现 */ withdrawDialogTitle() { - const sym = String((this.currentWithdrawRow && this.currentWithdrawRow.payCoin) || '').toUpperCase() || 'USDT' + const sym = String((this.currentWithdrawRow && this.currentWithdrawRow.payCoin) || '').toUpperCase() || '' return `${sym}提现` }, /* 提现币种(大写) */ diff --git a/power_leasing/src/views/account/orderDetail.vue b/power_leasing/src/views/account/orderDetail.vue index 20de93a..4624718 100644 --- a/power_leasing/src/views/account/orderDetail.vue +++ b/power_leasing/src/views/account/orderDetail.vue @@ -8,7 +8,11 @@
订单号:{{ order.orderNumber || '—' }}
状态:{{ getOrderStatusText(order.status) }}
店铺:{{ order.shopName || '—' }}
-
金额(USDT):{{ order.totalPrice }}
+
订单总价({{ order.payCoin }}){{ order.totalPrice }}
+
实际支付总金额({{ order.payCoin }}){{ order.totalPayAmount !== null && order.totalPayAmount !== undefined ? order.totalPayAmount : '' }}
+
实际算力:{{ order.totalPracticalPower !== null && order.totalPracticalPower !== undefined ? order.totalPracticalPower : '' }}
+
理论总算力:{{ order.totalTheoryPower !== null && order.totalTheoryPower !== undefined ? order.totalTheoryPower : '' }}
+
实际/理论算力比值:{{ order.powerRatio !== null && order.powerRatio !== undefined ? order.powerRatio : '' }}
创建时间:{{ formatDateTime(order.createTime) }}
订单完成时间:{{ formatDateTime(order.endTime) }}
@@ -20,16 +24,27 @@ - - + + + + - - + + + + + + + - +
返回 diff --git a/power_leasing/src/views/account/orders.vue b/power_leasing/src/views/account/orders.vue index c94d506..c682d53 100644 --- a/power_leasing/src/views/account/orders.vue +++ b/power_leasing/src/views/account/orders.vue @@ -8,6 +8,10 @@ + +
失败原因:无法连接矿池,导致生成订单失败
+ +
@@ -33,7 +37,7 @@ export default { data() { return { active: '7', // 默认值改为 '7'(订单进行中) - orders: { 7: [], 8: [], 9: [] }, + orders: { 7: [], 8: [], 9: [], 11: [] }, loading: false } }, @@ -103,6 +107,7 @@ export default { .orders-page { padding: 12px; } .title { margin: 0 0 12px 0; font-weight: 600; color: #2c3e50; } .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-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; } diff --git a/power_leasing/src/views/account/productMachineAdd.vue b/power_leasing/src/views/account/productMachineAdd.vue index 5225084..ee1bd56 100644 --- a/power_leasing/src/views/account/productMachineAdd.vue +++ b/power_leasing/src/views/account/productMachineAdd.vue @@ -205,7 +205,7 @@ - + - + - + - + - + - + - + - + - + @@ -1643,23 +1644,27 @@ export default { .paytype-icon { width: 22px; height: 22px; border-radius: 4px; display: inline-block; } .gpu-price-row { + /* 售价单列竖排显示,自动换行 */ display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); /* 两列并排,减少单元格高度 */ - gap: 10px 16px; + grid-template-columns: 1fr; + gap: 10px 0; + width: 100%; } .gpu-price-item { display: grid; - grid-template-columns: 100px 1fr; /* 左侧标签固定宽度,右侧输入自适应 */ + grid-template-columns: 96px minmax(0, 1fr); /* 左侧标签固定宽度,右侧输入自适应 */ align-items: center; + min-width: 0; } .gpu-price-label { color: #666; white-space: nowrap; text-align: right; - padding-right: 8px; + padding-right: 10px; } .gpu-price-input { width: 100%; + max-width: 160px; } .gpu-state { display: inline-flex; diff --git a/power_leasing/src/views/account/purchasedMachineConfig.vue b/power_leasing/src/views/account/purchasedMachineConfig.vue index df02b25..6a2fc51 100644 --- a/power_leasing/src/views/account/purchasedMachineConfig.vue +++ b/power_leasing/src/views/account/purchasedMachineConfig.vue @@ -2,7 +2,7 @@
@@ -83,7 +83,7 @@
- 已购矿机信息 + 矿机信息
- + @@ -154,32 +156,32 @@ export default { return { loading: false, rows: [ - { - orderId: '1234567890', - fromChain: 'tron', - fromSymbol: 'USDT', - fromAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', - toChain: 'tron', - coin: 'USDT', - toAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', - txHash: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', - status: 2, - updateTime: '2024-01-15 14:30:25', - realAmount: 100, - }, - { - orderId: '1234567890', - fromChain: 'tron', - fromSymbol: 'USDT', - fromAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', - toChain: 'tron', - coin: 'USDT', - toAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', - txHash: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', - status: 1, - updateTime: '2024-01-15 14:30:25', - realAmount: 106, - } + // { + // orderId: '1234567890', + // fromChain: 'tron', + // fromSymbol: 'USDT', + // fromAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', + // toChain: 'tron', + // coin: 'USDT', + // toAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', + // txHash: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', + // status: 2, + // updateTime: '2024-01-15 14:30:25', + // realAmount: 100, + // }, + // { + // orderId: '1234567890', + // fromChain: 'tron', + // fromSymbol: 'USDT', + // fromAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', + // toChain: 'tron', + // coin: 'USDT', + // toAddress: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', + // txHash: 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE', + // status: 1, + // updateTime: '2024-01-15 14:30:25', + // realAmount: 106, + // } ], page: 1, pageSize: 10, diff --git a/power_leasing/src/views/account/rechargeRecord.vue b/power_leasing/src/views/account/rechargeRecord.vue index 0fbc694..d0402c3 100644 --- a/power_leasing/src/views/account/rechargeRecord.vue +++ b/power_leasing/src/views/account/rechargeRecord.vue @@ -30,7 +30,7 @@
- {{ item.amount }} {{ item.fromSymbol || "USDT" }} + {{ item.amount }} {{ item.fromSymbol || "" }}
{{ getChainName(item.fromChain) }}
@@ -82,7 +82,7 @@
- {{ item.amount }} {{ item.fromSymbol || "USDT" }} + {{ item.amount }} {{ item.fromSymbol || "" }}
{{ getChainName(item.fromChain) }}
@@ -134,7 +134,7 @@
- {{ item.amount }} {{ item.fromSymbol || "USDT" }} + {{ item.amount }} {{ item.fromSymbol || "" }}
{{ getChainName(item.fromChain) }}
@@ -203,7 +203,7 @@ 充值金额 {{ selectedItem.amount }} - {{ selectedItem.fromSymbol || "USDT" }}
@@ -306,36 +306,36 @@ export default { // 充值记录数据 rechargeRecords: [ - { - address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", - amount: 100, - fromSymbol: "USDT", - fromChain: "tron", - status: 2, - createTime: "2024-01-15 14:30:25", - id: 1, - txHash: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", - }, - { - address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", - amount: 100, - fromSymbol: "USDT", - fromChain: "tron", - status: 2, - createTime: "2024-01-15 14:30:25", - id: 2, - txHash: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", - }, - { - address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", - amount: 100, - fromSymbol: "USDT", - fromChain: "tron", - status: 2, - createTime: "2024-01-15 14:30:25", - id: 3, - txHash: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", - }, + // { + // address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", + // amount: 100, + // fromSymbol: "USDT", + // fromChain: "tron", + // status: 2, + // createTime: "2024-01-15 14:30:25", + // id: 1, + // txHash: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", + // }, + // { + // address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", + // amount: 100, + // fromSymbol: "USDT", + // fromChain: "tron", + // status: 2, + // createTime: "2024-01-15 14:30:25", + // id: 2, + // txHash: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", + // }, + // { + // address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", + // amount: 100, + // fromSymbol: "USDT", + // fromChain: "tron", + // status: 2, + // createTime: "2024-01-15 14:30:25", + // id: 3, + // txHash: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", + // }, // { // address: "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", // amount: 100, diff --git a/power_leasing/src/views/account/securitySettings.vue b/power_leasing/src/views/account/securitySettings.vue index 03deacb..4fcce1f 100644 --- a/power_leasing/src/views/account/securitySettings.vue +++ b/power_leasing/src/views/account/securitySettings.vue @@ -467,6 +467,7 @@ import { getBindInfo, bindGoogle, sendOpenGoogleCode,getGoogleStatus,closeStepTwo,sendCloseGoogleCode,openStepTwo } from '../../api/verification' import { rsaEncrypt } from '../../utils/rsaEncrypt' import { closeAccount, sendCloseAccount,sendUpdatePwdCode,updatePasswordInCenter} from '../../api/user' +import { createPasswordValidator } from '../../utils/validators/password' export default { name: 'SecuritySettings', data() { @@ -510,6 +511,8 @@ export default { statusLoading: false, // 状态查询的 loading step1Visible: false, step2Visible: false, + // 仅用于步骤 1/2 的弹窗切换:防止“下一步”触发 step1 @close 后把二维码清空 + step1ClosingForStepTransition: false, closeDialogVisible: false, // 关闭双重验证弹窗 openDialogVisible: false, // 开启双重验证弹窗 deleteAccountDialogVisible: false, // 注销账号弹窗 @@ -682,6 +685,7 @@ export default { mounted() { this.check2FAStatus() this.loadUserEmail() + this.initChangePasswordRules() }, beforeDestroy() { if (this.countdownTimer) { @@ -698,6 +702,31 @@ export default { } }, 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) * getGoogleStatus 返回值:0 开启;1 未绑定;2 关闭 @@ -1033,9 +1062,15 @@ export default { * 只有在用户真正取消(点击取消按钮或 X)时才清空 */ handleStep1Close() { + // 关键:点击“下一步”时也会触发 step1 的 close 事件(因为 step1Visible=false), + // 这种场景不要清空二维码,否则“上一步”回来会一直显示加载中。 + if (this.step1ClosingForStepTransition) { + this.step1ClosingForStepTransition = false + return + } + // 用户真正关闭(取消 / 右上角 X):清空二维码与密钥,避免下次进入使用旧数据 this.qrCodeUrl = '' - // 不清空 secretKey,因为第二步提交时需要用到 - // 如果用户点击取消,会在 handleStep2Close 中清空 + this.secretKey = '' }, /** * 进入第二步 @@ -1045,6 +1080,8 @@ export default { this.$message.warning('请先获取二维码或密钥') return } + // 标记:本次关闭 step1 是为了进入 step2,不应清空二维码/密钥 + this.step1ClosingForStepTransition = true this.step1Visible = false this.step2Visible = true }, @@ -1241,11 +1278,14 @@ export default { * 确认密码验证(用于表单验证规则) */ validateConfirmPassword(rule, value, callback) { - if (!value) { + const confirmVal = (value || '').trim() + const passwordVal = (this.changePasswordForm.password || '').trim() + + if (!confirmVal) { callback(new Error('请再次输入新密码')) return } - if (value !== this.changePasswordForm.password) { + if (confirmVal !== passwordVal) { callback(new Error('两次输入的密码不一致')) return } @@ -1287,12 +1327,10 @@ export default { this.$message.success('密码修改成功') this.changePasswordDialogVisible = false this.handleChangePasswordDialogClose() - } else { - this.$message.error(res?.message || res?.msg || '修改密码失败,请检查输入信息') - } + } } catch (e) { console.error('修改密码失败', e) - this.$message.error('修改密码失败,请稍后重试') + } finally { this.changingPassword = false } @@ -1732,12 +1770,14 @@ export default { gap: 6px; margin-top: 6px; padding: 10px 12px; - background: #f0f9ff; - border: 1px solid #b3d8ff; + background: #f5f7ff; + border-left: 3px solid #667eea; border-radius: 4px; font-size: 12px; - color: #606266; + color: #666; line-height: 1.5; + text-align: left; + box-sizing: border-box; } .password-tip span { diff --git a/power_leasing/src/views/account/sellerFundsFlow.vue b/power_leasing/src/views/account/sellerFundsFlow.vue index 2f22210..8392999 100644 --- a/power_leasing/src/views/account/sellerFundsFlow.vue +++ b/power_leasing/src/views/account/sellerFundsFlow.vue @@ -11,6 +11,7 @@ 0”等校验,不参与上限判断) 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) // 允许提现金额等于可用余额,但不能大于 if (amountInt > availableBalanceInt) { @@ -1088,7 +1078,7 @@ export default { // 检查最小提现金额 // 最小提现金额 1 USDT if (amountInt < 1000000) { - callback(new Error('最小提现金额为1 USDT')) + callback(new Error('最小提现金额为1')) return } diff --git a/power_leasing/src/views/account/withdrawRecord.vue b/power_leasing/src/views/account/withdrawRecord.vue index 6f17a65..cd05d53 100644 --- a/power_leasing/src/views/account/withdrawRecord.vue +++ b/power_leasing/src/views/account/withdrawRecord.vue @@ -28,24 +28,24 @@ @@ -54,20 +54,37 @@ - + - + @@ -82,7 +99,7 @@
-
🏧
+
暂无提现记录
@@ -111,6 +128,33 @@ export default { return { loading: false, 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, pageSize: 20, total: 0 @@ -163,6 +207,13 @@ export default { async fetchList() { this.loading = true 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 data = res && (res.data || res) 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; } .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; } +/** 交易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; } +} diff --git a/power_leasing/src/views/account/withdrawalHistory.vue b/power_leasing/src/views/account/withdrawalHistory.vue index f259c1e..579970e 100644 --- a/power_leasing/src/views/account/withdrawalHistory.vue +++ b/power_leasing/src/views/account/withdrawalHistory.vue @@ -75,7 +75,7 @@ >
-
{{ item.amount }} {{ item.toSymbol || 'USDT' }}
+
{{ item.amount }} {{ item.toSymbol || '' }}
{{ getChainName(item.toChain) }}
@@ -123,7 +123,7 @@ >
-
{{ item.amount }} {{ item.toSymbol || 'USDT' }}
+
{{ item.amount }} {{ item.toSymbol || '' }}
{{ getChainName(item.toChain) }}
@@ -190,7 +190,7 @@
提现金额 - {{ selectedItem.amount }} {{ selectedItem.toSymbol || 'USDT' }} + {{ selectedItem.amount }} {{ selectedItem.toSymbol || '' }}
区块链网络 diff --git a/power_leasing/src/views/cart/index.vue b/power_leasing/src/views/cart/index.vue index df2364d..99f1577 100644 --- a/power_leasing/src/views/cart/index.vue +++ b/power_leasing/src/views/cart/index.vue @@ -158,7 +158,7 @@ - +