From d97a58ed5302c6650ba9670d41bb3e9e132800c8 Mon Sep 17 00:00:00 2001
From: whitechiina <1293616053@qq.com>
Date: Mon, 7 Sep 2026 10:45:55 +0800
Subject: [PATCH] updata
---
api/assets.js | 44 ++-
pages/assets/wallet.vue | 16 +-
pages/assets/withdraw.vue | 257 +++++++++++++++---
unpackage/dist/build/web/index.html | 2 +-
.../{index.dd7af24c.js => index.19c00be4.js} | 2 +-
...ges-assets-bmtr~pages~f90d3c1d.0f4a29e3.js | 1 +
...ges-assets-bmtr~pages~f90d3c1d.a7148041.js | 1 -
.../static/js/pages-assets-wallet.af6a62e4.js | 1 +
.../static/js/pages-assets-wallet.cab365be.js | 1 -
.../js/pages-assets-withdraw.17213ac7.js | 1 -
.../js/pages-assets-withdraw.e41ce0e3.js | 1 +
11 files changed, 280 insertions(+), 47 deletions(-)
rename unpackage/dist/build/web/static/js/{index.dd7af24c.js => index.19c00be4.js} (99%)
create mode 100644 unpackage/dist/build/web/static/js/pages-assets-balance-center~pages-assets-bmt-exchange~pages-assets-bmt-flash~pages-assets-bmtr~pages~f90d3c1d.0f4a29e3.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-balance-center~pages-assets-bmt-exchange~pages-assets-bmt-flash~pages-assets-bmtr~pages~f90d3c1d.a7148041.js
create mode 100644 unpackage/dist/build/web/static/js/pages-assets-wallet.af6a62e4.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-wallet.cab365be.js
delete mode 100644 unpackage/dist/build/web/static/js/pages-assets-withdraw.17213ac7.js
create mode 100644 unpackage/dist/build/web/static/js/pages-assets-withdraw.e41ce0e3.js
diff --git a/api/assets.js b/api/assets.js
index 355304b..c909ac8 100644
--- a/api/assets.js
+++ b/api/assets.js
@@ -384,12 +384,37 @@ function normalizeWalletSource(data) {
const hasExplicitWalletFields =
Object.prototype.hasOwnProperty.call(source, "address") ||
Object.prototype.hasOwnProperty.call(source, "more_address") ||
- Object.prototype.hasOwnProperty.call(source, "moreAddress");
+ Object.prototype.hasOwnProperty.call(source, "moreAddress") ||
+ Object.prototype.hasOwnProperty.call(source, "more_address_info") ||
+ Object.prototype.hasOwnProperty.call(source, "moreAddressInfo");
if (hasExplicitWalletFields) {
const walletSource = [];
const defaultAddress = String(source.address || "").trim();
- const moreAddress = pickFirstValue(source, ["more_address", "moreAddress"]);
+ const moreAddressInfo = pickFirstValue(source, [
+ "more_address_info",
+ "moreAddressInfo",
+ ]);
+ const hasMoreAddressInfo =
+ (Array.isArray(moreAddressInfo) && moreAddressInfo.length > 0) ||
+ (moreAddressInfo && typeof moreAddressInfo === "object");
+ const moreAddress = hasMoreAddressInfo
+ ? moreAddressInfo
+ : pickFirstValue(source, ["more_address", "moreAddress"]);
+ const moreAddressNames = normalizeWalletSource(
+ pickFirstValue(source, [
+ "more_address_name",
+ "moreAddressName",
+ "more_address_names",
+ "moreAddressNames",
+ "more_name",
+ "moreName",
+ "more_names",
+ "moreNames",
+ "wallet_names",
+ "walletNames",
+ ]),
+ );
if (defaultAddress) {
walletSource.push({
@@ -401,6 +426,16 @@ function normalizeWalletSource(data) {
}
normalizeWalletSource(moreAddress).forEach(function (item, index) {
+ const indexedName = moreAddressNames[index];
+ const fallbackName =
+ indexedName && typeof indexedName === "object"
+ ? pickFirstValue(indexedName, [
+ "name",
+ "wallet_name",
+ "walletName",
+ "value",
+ ])
+ : indexedName;
const address = String(
item && typeof item === "object"
? pickFirstValue(item, [
@@ -420,7 +455,7 @@ function normalizeWalletSource(data) {
name:
item && typeof item === "object"
? pickFirstValue(item, ["name", "wallet_name", "walletName"])
- : "",
+ : fallbackName || "",
});
}
});
@@ -3297,6 +3332,9 @@ export async function saveAssetWallet(payload, requestOptions) {
if (!address) {
throw createError("请输入钱包地址");
}
+ if (type === 1 && !name) {
+ throw createError("请输入钱包名称");
+ }
if (type === 0 && addressList.length > 1) {
throw createError("默认钱包只能填写一个地址");
}
diff --git a/pages/assets/wallet.vue b/pages/assets/wallet.vue
index 9721c16..84c88d2 100644
--- a/pages/assets/wallet.vue
+++ b/pages/assets/wallet.vue
@@ -207,7 +207,7 @@
v-model="moreWalletName"
class="wallet-edit-dialog__input"
type="text"
- placeholder="请输入钱包名称(选填)"
+ placeholder="请输入钱包名称"
placeholder-style="color:rgba(165,175,208,0.82);font-size:28rpx;"
:maxlength="30"
/>
@@ -225,7 +225,7 @@
/>
- *钱包地址确认后,无法修改,请仔细核对钱包地址
+ *每次只能添加一个钱包地址;请仔细核对地址
@@ -639,6 +639,14 @@ export default {
return;
}
+ if (!this.trimmedMoreWalletName) {
+ uni.showToast({
+ title: "请输入钱包名称",
+ icon: "none",
+ });
+ return;
+ }
+
if (addresses.length > this.remainingMoreAddressCount) {
uni.showToast({
title:
@@ -1004,7 +1012,7 @@ export default {
.wallet-edit-dialog__label {
display: block;
margin-top: 4rpx;
- font-size: 26rpx;
+ font-size: 30rpx;
line-height: 1.6;
color: rgba(220, 228, 250, 0.92);
}
@@ -1065,7 +1073,7 @@ export default {
.wallet-edit-dialog__desc {
display: block;
margin-top: 26rpx;
- font-size: 22rpx;
+ font-size: 26rpx;
line-height: 1.8;
color: #F77E57;
}
diff --git a/pages/assets/withdraw.vue b/pages/assets/withdraw.vue
index de2102f..7e16acb 100644
--- a/pages/assets/withdraw.vue
+++ b/pages/assets/withdraw.vue
@@ -70,24 +70,21 @@
-
- 默认钱包
+
+ {{ selectedWallet.isDefault ? "默认钱包" : selectedWallet.name }}
-
-
- 选择钱包
-
-
-
+ 选择钱包
+
+
复制
@@ -160,6 +157,57 @@
+
+
+
+
+ 选择钱包
+
+
+
+
+
+
+
+
+
+ {{ wallet.isDefault ? "默认钱包" : wallet.name || wallet.address }}
+
+
+ ✓
+
+
+ {{ wallet.address }}
+
+
+
+
@@ -192,6 +240,7 @@ export default {
},
confirmVisible: false,
walletVisible: false,
+ walletPickerVisible: false,
selectedWalletIndex: 0,
submitting: false,
};
@@ -207,6 +256,14 @@ export default {
this.hasShown = true;
},
+ onBackPress() {
+ if (this.walletPickerVisible) {
+ this.walletPickerVisible = false;
+ return true;
+ }
+
+ return false;
+ },
computed: {
amountValue() {
return Number(this.form.amount || 0);
@@ -271,17 +328,11 @@ export default {
: [];
return wallets[this.selectedWalletIndex] || wallets[0] || null;
},
- walletOptions() {
+ walletPickerListHeight() {
const wallets = Array.isArray(this.detail.wallets)
? this.detail.wallets
: [];
- return wallets.map((wallet, index) => {
- const address = this.maskWalletAddress(wallet.address);
- return {
- label: wallet.isDefault ? `默认钱包 ${address}` : address,
- value: index,
- };
- });
+ return Math.min(Math.max(wallets.length * 170, 300), 680) + "rpx";
},
},
methods: {
@@ -428,6 +479,7 @@ export default {
this.selectedWalletIndex =
matchedIndex >= 0 ? matchedIndex : defaultIndex >= 0 ? defaultIndex : 0;
this.walletVisible = false;
+ this.walletPickerVisible = false;
} catch (error) {
console.log(error)
uni.showToast({
@@ -449,9 +501,28 @@ export default {
}
return value.slice(0, 8) + "..." + value.slice(-8);
},
- selectWallet(event) {
- const index = Number(event && event.detail ? event.detail.value : 0);
- this.selectedWalletIndex = Number.isFinite(index) ? index : 0;
+ openWalletPicker() {
+ if (!this.detail.wallets || this.detail.wallets.length <= 1) {
+ return;
+ }
+
+ this.walletPickerVisible = true;
+ },
+ closeWalletPicker() {
+ this.walletPickerVisible = false;
+ },
+ selectWallet(index) {
+ const nextIndex = Number(index);
+ if (
+ !Number.isFinite(nextIndex) ||
+ nextIndex < 0 ||
+ nextIndex >= this.detail.wallets.length
+ ) {
+ return;
+ }
+
+ this.selectedWalletIndex = nextIndex;
+ this.walletPickerVisible = false;
this.walletVisible = false;
},
copyWallet() {
@@ -823,16 +894,14 @@ export default {
min-width: 0;
}
-.wallet-box__picker {
- display: flex;
- align-items: center;
- flex-shrink: 0;
- height: 44rpx;
- margin-right: 24rpx;
-}
-
.wallet-box__name {
- font-size: 26rpx;
+ display: block;
+ max-width: 240rpx;
+ overflow: hidden;
+ font-size: 28rpx;
+ line-height: 44rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
color: rgba(232, 239, 255, 0.88);
}
@@ -849,12 +918,17 @@ export default {
display: flex;
align-items: center;
height: 44rpx;
- font-size: 26rpx;
+ padding: 0 4rpx;
+ font-size: 29rpx;
line-height: 44rpx;
font-weight: 400;
color: #20b6f5;
}
+.wallet-box__select-action {
+ margin-right: 24rpx;
+}
+
.wallet-box__arrow {
width: 10rpx;
height: 10rpx;
@@ -866,6 +940,119 @@ export default {
flex-shrink: 0;
}
+.wallet-picker-mask {
+ position: fixed;
+ inset: 0;
+ z-index: 90;
+ display: flex;
+ align-items: flex-end;
+ background: rgba(5, 10, 22, 0.72);
+}
+
+.wallet-picker-panel {
+ width: 100%;
+ max-height: 78vh;
+ padding: 30rpx 24rpx calc(68rpx + env(safe-area-inset-bottom));
+ border-radius: 28rpx 28rpx 0 0;
+ border: 1px solid rgba(142, 157, 206, 0.14);
+ background: #2a2f4d;
+ box-shadow: 0 -20rpx 70rpx rgba(0, 0, 0, 0.28);
+ box-sizing: border-box;
+ overflow: hidden;
+}
+
+.wallet-picker-panel__head {
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ min-height: 52rpx;
+}
+
+.wallet-picker-panel__title {
+ font-size: 34rpx;
+ font-weight: 700;
+ color: #ffffff;
+}
+
+.wallet-picker-panel__close {
+ position: absolute;
+ right: 0;
+ top: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 52rpx;
+ height: 52rpx;
+ transform: translateY(-50%);
+}
+
+.wallet-picker-panel__close-image {
+ width: 32rpx;
+ height: 32rpx;
+}
+
+.wallet-picker-list {
+ margin-top: 22rpx;
+}
+
+.wallet-picker-item {
+ padding: 24rpx 22rpx;
+ border: 1px solid rgba(157, 173, 221, 0.16);
+ border-radius: 12rpx;
+ background: rgba(53, 62, 94, 0.72);
+ box-sizing: border-box;
+}
+
+.wallet-picker-item + .wallet-picker-item {
+ margin-top: 16rpx;
+}
+
+.wallet-picker-item--selected {
+ border-color: rgba(32, 182, 245, 0.9);
+ background: rgba(32, 182, 245, 0.14);
+}
+
+.wallet-picker-item__head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.wallet-picker-item__name {
+ flex: 1;
+ min-width: 0;
+ padding-right: 20rpx;
+ font-size: 34rpx;
+ font-weight: 700;
+ line-height: 1.5;
+ color: #ffffff;
+ word-break: break-all;
+}
+
+.wallet-picker-item__check {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 40rpx;
+ height: 40rpx;
+ border-radius: 50%;
+ background: #20b6f5;
+ font-size: 24rpx;
+ font-weight: 700;
+ color: #ffffff;
+ flex-shrink: 0;
+}
+
+.wallet-picker-item__address {
+ display: block;
+ margin-top: 12rpx;
+ font-size: 26rpx;
+ line-height: 1.6;
+ color: rgba(224, 231, 250, 0.86);
+ word-break: break-all;
+}
+
.wallet-box__address {
margin-top: 18rpx;
font-size: 26rpx;
diff --git a/unpackage/dist/build/web/index.html b/unpackage/dist/build/web/index.html
index af15b33..b368617 100644
--- a/unpackage/dist/build/web/index.html
+++ b/unpackage/dist/build/web/index.html
@@ -1,2 +1,2 @@
白马交易所
\ No newline at end of file
+ document.write('')