bm-bmt/pages/assets/wallet.vue

1154 lines
28 KiB
Vue

<template>
<view class="asset-page asset-theme wallet-page">
<asset-page-shell title="钱包地址" />
<view class="asset-scroll wallet-scroll">
<view class="wallet-panel">
<view class="wallet-panel__head">
<view class="wallet-panel__title">
<view class="wallet-panel__title-icon">
<view class="wallet-panel__title-tab"></view>
<view class="wallet-panel__title-body"></view>
</view>
<text class="wallet-panel__title-text">当前钱包地址</text>
</view>
<text class="wallet-panel__subtitle">我在交易所的钱包地址</text>
</view>
<view v-if="currentWallet" class="wallet-panel__content">
<view class="wallet-panel__address-box">{{
currentWallet.address
}}</view>
<view class="wallet-panel__footer">
<text class="wallet-panel__name">{{ currentWallet.name }}</text>
<text
class="wallet-panel__copy"
@click="copy(currentWallet.address)"
>复制地址</text
>
</view>
<view class="wallet-edit-dialog__desc" style="font-size: 26rpx">
钱包地址确认后,无法多次修改,请仔细核对钱包地址!
</view>
</view>
<view v-else class="wallet-panel__new">
<view class="wallet-input">
<input
v-model="draftAddress"
class="wallet-input__field asset-number-font"
type="text"
placeholder="粘贴新钱包地址"
placeholder-style="color:rgba(154, 163, 197, 0.82);font-size:28rpx;"
/>
<!-- <text class="wallet-input__paste" @click="paste">粘贴</text> -->
</view>
<text class="wallet-panel__helper">
钱包地址请在【海南农综】APP中获取
</text>
<view class="wallet-edit-dialog__desc" style="font-size: 26rpx">
钱包地址确认后,无法多次修改,请仔细核对钱包地址!
</view>
</view>
</view>
<view v-if="showMoreWalletSection" class="wallet-panel wallet-panel--more">
<view class="wallet-panel__head">
<view class="wallet-panel__title">
<view class="wallet-panel__title-icon">
<view class="wallet-panel__title-tab"></view>
<view class="wallet-panel__title-body"></view>
</view>
<text class="wallet-panel__title-text">其他钱包地址</text>
</view>
<text class="wallet-panel__subtitle">{{ moreAddressNum }} 个</text>
</view>
<view v-if="moreWallets.length" class="wallet-more-list">
<view
v-for="(wallet, index) in moreWallets"
:key="wallet.id"
class="wallet-more-item"
>
<view class="wallet-more-item__head">
<text class="wallet-more-item__name">
{{ wallet.name || "钱包地址 " + (index + 1) }}
</text>
<text class="wallet-panel__copy" @click="copy(wallet.address)">
复制地址
</text>
</view>
<text class="wallet-more-item__address asset-number-font">{{
wallet.address
}}</text>
</view>
</view>
<text v-else class="wallet-more-empty">暂未添加其他钱包地址</text>
</view>
<view
v-if="canAddMoreWallet"
class="wallet-more-action wallet-more-action--standalone"
@click="openMoreAddressDialog"
>
添加钱包地址
</view>
<view
class="wallet-actions"
:class="{
'wallet-actions--compact': !currentWallet,
'wallet-actions--single': currentWallet && !canModifyWallet,
}"
>
<view
v-if="!currentWallet || canModifyWallet"
class="wallet-button wallet-button--primary"
@touchend.stop.prevent="handlePrimaryAction"
@tap.stop="handlePrimaryAction"
@click.stop="handlePrimaryAction"
>
{{
currentWallet
? "修改默认地址"
: savingAddress
? "保存中..."
: "保存"
}}
</view>
<view
class="wallet-button wallet-button--secondary"
@click="handleBack"
>
返回
</view>
</view>
<view v-if="!currentWallet" class="get-walleck">
<view class="title">获取操作流程</view>
<view
v-for="(imageUrl, index) in walletFlowImages"
:key="imageUrl"
class="img"
@click="previewWalletFlow(index)"
>
<image :src="imageUrl" mode="widthFix"></image>
</view>
</view>
</view>
<wallet-action-popup
:visible="createConfirmVisible"
title="新增钱包"
message="钱包地址确认后,无法修改,请仔细核对钱包地址"
:address="trimmedDraftAddress"
confirm-text="确认添加"
cancel-text="返回检查"
@cancel="createConfirmVisible = false"
@confirm="saveCurrentAddress"
/>
<wallet-action-popup
:visible="editConfirmVisible"
title="修改钱包"
message="钱包地址确认后,无法修改,请仔细核对钱包地址"
:address="pendingEditAddress"
confirm-text="确认修改"
cancel-text="返回检查"
@cancel="cancelEditConfirm"
@confirm="saveEditedAddress"
/>
<asset-confirm-popup
class="wallet-edit-popup"
:visible="editDialogVisible"
title="修改钱包"
:confirm-text="editingAddress ? '确认中...' : '确认'"
cancel-text="取消"
:close-on-mask="false"
@cancel="closeEditDialog"
@confirm="confirmEditAddress"
>
<view class="wallet-edit-dialog">
<text class="wallet-edit-dialog__message">确认修改钱包新地址</text>
<view class="wallet-edit-dialog__box">
<input
v-model="editAddress"
class="wallet-edit-dialog__input asset-number-font"
type="text"
placeholder="粘贴新钱包地址"
placeholder-style="color:rgba(165,175,208,0.82);font-size:28rpx;"
/>
<!-- <text class="wallet-edit-dialog__paste" @click.stop="pasteEditAddress">
粘贴
</text> -->
</view>
<text class="wallet-edit-dialog__desc asset-number-font" style="font-size: 28rpx">
*请仔细核对钱包地址,以免造成财产损失
</text>
</view>
</asset-confirm-popup>
<asset-confirm-popup
class="wallet-edit-popup"
:visible="moreAddressDialogVisible"
title="添加钱包地址"
confirm-text="下一步"
cancel-text="取消"
:close-on-mask="false"
@cancel="closeMoreAddressDialog"
@confirm="confirmMoreAddresses"
>
<view class="wallet-edit-dialog">
<text class="wallet-edit-dialog__label">钱包名称</text>
<view class="wallet-edit-dialog__box wallet-edit-dialog__box--input">
<input
v-model="moreWalletName"
class="wallet-edit-dialog__input"
type="text"
placeholder="请输入钱包名称(选填)"
placeholder-style="color:rgba(165,175,208,0.82);font-size:28rpx;"
:maxlength="30"
/>
</view>
<text class="wallet-edit-dialog__label wallet-edit-dialog__label--address">
钱包地址
</text>
<view class="wallet-edit-dialog__box wallet-edit-dialog__box--textarea">
<textarea
v-model="moreAddressInput"
class="wallet-edit-dialog__textarea asset-number-font"
placeholder="请输入钱包地址"
placeholder-style="color:rgba(165,175,208,0.82);font-size:28rpx;"
:maxlength="-1"
/>
</view>
<text class="wallet-edit-dialog__desc">
*钱包地址确认后,无法修改,请仔细核对钱包地址
</text>
</view>
</asset-confirm-popup>
<wallet-action-popup
:visible="moreAddressConfirmVisible"
title="确认添加钱包"
message="钱包地址确认后,无法修改,请仔细核对钱包地址"
:address="pendingMoreAddress"
:description="moreAddressConfirmDescription"
confirm-text="确认添加"
cancel-text="返回检查"
@cancel="cancelMoreAddressConfirm"
@confirm="saveMoreAddresses"
/>
<view v-if="successTipVisible" class="wallet-success-tip">
<image
class="wallet-success-tip__icon"
src="https://imgs.agrimedia.cn/bm-bmt/success.png"
mode="aspectFit"
></image>
<text class="wallet-success-tip__text">{{ successTipText }}</text>
</view>
</view>
</template>
<script>
import AssetPageShell from "../../components/asset-page-shell.vue";
import AssetConfirmPopup from "../../components/asset-confirm-popup.vue";
import WalletActionPopup from "../../components/wallet-action-popup.vue";
import {
fetchWalletDetail,
saveAssetWallet,
} from "../../api/assets";
export default {
components: {
AssetPageShell,
AssetConfirmPopup,
WalletActionPopup,
},
data() {
return {
wallets: [],
draftAddress: "",
savingAddress: false,
editDialogVisible: false,
editAddress: "",
pendingEditAddress: "",
moreAddressInput: "",
moreWalletName: "",
pendingMoreAddress: "",
pendingMoreWalletName: "",
editingAddress: false,
savingMoreAddress: false,
createConfirmVisible: false,
editConfirmVisible: false,
moreAddressDialogVisible: false,
moreAddressConfirmVisible: false,
walletCanModify: false,
moreAddressNum: 0,
successTipVisible: false,
successTipText: "",
successTipTimer: null,
primaryActionAt: 0,
walletFlowImages: [
"https://imgs.agrimedia.cn/bm-bmt/wallect-1.png",
"https://imgs.agrimedia.cn/bm-bmt/wallect-2.png",
"https://imgs.agrimedia.cn/bm-bmt/wallect-3.png",
"https://imgs.agrimedia.cn/bm-bmt/wallect-4-s.png",
"https://imgs.agrimedia.cn/bm-bmt/wallect-5.png",
],
};
},
onShow() {
this.loadPage();
},
onUnload() {
this.clearSuccessTipTimer();
},
computed: {
currentWallet() {
for (let i = 0; i < this.wallets.length; i += 1) {
if (this.wallets[i].isDefault) {
return this.wallets[i];
}
}
return null;
},
moreWallets() {
return this.wallets.filter(function (wallet) {
return !wallet.isDefault;
});
},
showMoreWalletSection() {
return Boolean(this.currentWallet) && this.moreAddressNum > 0;
},
remainingMoreAddressCount() {
return Math.max(0, this.moreAddressNum - this.moreWallets.length);
},
canAddMoreWallet() {
return Boolean(this.currentWallet) && this.remainingMoreAddressCount > 0;
},
trimmedDraftAddress() {
return String(this.draftAddress || "").trim();
},
trimmedEditAddress() {
return String(this.editAddress || "").trim();
},
trimmedMoreWalletName() {
return String(this.moreWalletName || "").trim();
},
moreAddressConfirmDescription() {
if (this.pendingMoreWalletName) {
return "钱包名称:" + this.pendingMoreWalletName;
}
return "多个钱包地址将使用英文逗号分隔后提交";
},
canModifyWallet() {
if (!this.currentWallet) {
return false;
}
return this.walletCanModify;
},
},
methods: {
async loadPage() {
try {
const result = await fetchWalletDetail();
this.wallets = result.wallets || [];
this.walletCanModify = Boolean(result.canModify);
const moreAddressNum = Number(result.moreAddressNum || 0);
this.moreAddressNum = Number.isFinite(moreAddressNum)
? Math.max(0, Math.floor(moreAddressNum))
: 0;
if (this.currentWallet) {
this.draftAddress = this.currentWallet.address || "";
}
} catch (error) {
uni.showToast({
title: error.message || "钱包加载失败",
icon: "none",
});
}
},
handleBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack();
return;
}
uni.reLaunch({
url: "/pages/index/index",
});
},
copy(address) {
uni.setClipboardData({
data: address,
success() {
uni.showToast({
title: "已复制",
icon: "none",
});
},
});
},
paste() {
const that = this;
uni.getClipboardData({
success(result) {
that.draftAddress = result.data || "";
},
});
},
previewWalletFlow(index) {
const urls = Array.isArray(this.walletFlowImages)
? this.walletFlowImages
: [];
if (!urls.length) {
return;
}
const currentIndex = Number(index) || 0;
const currentUrl = urls[currentIndex] || urls[0];
uni.previewImage({
urls: urls,
current: currentUrl,
});
},
handlePrimaryAction() {
const now = Date.now();
if (now - this.primaryActionAt < 350) {
return;
}
this.primaryActionAt = now;
if (this.currentWallet) {
if (!this.canModifyWallet) {
return;
}
this.openEditDialog();
return;
}
this.openCreateConfirm();
},
openCreateConfirm() {
if (!this.trimmedDraftAddress) {
uni.showToast({
title: "请先粘贴钱包地址",
icon: "none",
});
return;
}
this.createConfirmVisible = true;
},
openEditDialog() {
if (!this.currentWallet) {
uni.showToast({
title: "钱包地址加载中,请稍后",
icon: "none",
});
return;
}
this.editAddress = "";
this.editDialogVisible = true;
},
closeEditDialog() {
this.editDialogVisible = false;
this.editAddress = "";
},
cancelEditConfirm() {
this.editConfirmVisible = false;
this.editAddress = this.pendingEditAddress;
this.editDialogVisible = true;
},
pasteEditAddress() {
uni.getClipboardData({
success: (result) => {
const clipboardValue =
result && result.data !== undefined && result.data !== null
? String(result.data)
: "";
this.editAddress = clipboardValue;
},
fail: () => {
uni.showToast({
title: "粘贴失败,请重试",
icon: "none",
});
},
});
},
clearSuccessTipTimer() {
if (this.successTipTimer) {
clearTimeout(this.successTipTimer);
this.successTipTimer = null;
}
},
showSuccessTip(text) {
const message = String(text || "").trim();
if (!message) {
return;
}
this.clearSuccessTipTimer();
this.successTipText = message;
this.successTipVisible = true;
this.successTipTimer = setTimeout(() => {
this.successTipVisible = false;
this.successTipTimer = null;
}, 1400);
},
confirmEditAddress() {
if (!this.currentWallet || !this.canModifyWallet || this.editingAddress) {
return;
}
if (!this.trimmedEditAddress) {
uni.showToast({
title: "请先粘贴钱包地址",
icon: "none",
});
return;
}
this.pendingEditAddress = this.trimmedEditAddress;
this.editDialogVisible = false;
this.editConfirmVisible = true;
},
async saveEditedAddress() {
if (
!this.currentWallet ||
!this.canModifyWallet ||
!this.pendingEditAddress ||
this.editingAddress
) {
return;
}
this.editingAddress = true;
try {
await saveAssetWallet(
{
address: this.pendingEditAddress,
type: 0,
},
{
showLoading: true,
loadingText: "保存中",
},
);
this.editConfirmVisible = false;
this.editAddress = "";
this.pendingEditAddress = "";
this.showSuccessTip("修改成功!");
this.loadPage();
} catch (error) {
uni.showToast({
title: error.message || "保存失败",
icon: "none",
});
} finally {
this.editingAddress = false;
}
},
async saveCurrentAddress() {
if (this.currentWallet || this.savingAddress) {
return;
}
if (!this.trimmedDraftAddress) {
uni.showToast({
title: "请先粘贴钱包地址",
icon: "none",
});
return;
}
this.savingAddress = true;
try {
await saveAssetWallet(
{
address: this.trimmedDraftAddress,
type: 0,
},
{
showLoading: true,
loadingText: "保存中",
},
);
this.createConfirmVisible = false;
this.showSuccessTip("保存成功!");
this.loadPage();
} catch (error) {
uni.showToast({
title: error.message || "保存失败",
icon: "none",
});
} finally {
this.savingAddress = false;
}
},
normalizeMoreAddresses(value) {
return String(value || "")
.split(/[\n,;]+/)
.map(function (address) {
return String(address || "").trim();
})
.filter(Boolean)
.filter(function (address, index, list) {
return list.indexOf(address) === index;
});
},
openMoreAddressDialog() {
if (!this.canAddMoreWallet) {
return;
}
this.moreAddressInput = "";
this.moreWalletName = "";
this.moreAddressDialogVisible = true;
},
closeMoreAddressDialog() {
this.moreAddressDialogVisible = false;
this.moreAddressInput = "";
this.moreWalletName = "";
},
confirmMoreAddresses() {
const addresses = this.normalizeMoreAddresses(this.moreAddressInput);
if (!addresses.length) {
uni.showToast({
title: "请输入至少一个钱包地址",
icon: "none",
});
return;
}
if (addresses.length > this.remainingMoreAddressCount) {
uni.showToast({
title:
"最多还可添加" +
this.remainingMoreAddressCount +
"个钱包地址",
icon: "none",
});
return;
}
if (this.trimmedMoreWalletName && addresses.length > 1) {
uni.showToast({
title: "设置钱包名称时一次只能添加一个地址",
icon: "none",
});
return;
}
if (addresses.indexOf(this.currentWallet.address) >= 0) {
uni.showToast({
title: "其他地址不能与默认地址相同",
icon: "none",
});
return;
}
const existingAddresses = this.moreWallets.map(function (wallet) {
return wallet.address;
});
if (addresses.some(function (address) {
return existingAddresses.indexOf(address) >= 0;
})) {
uni.showToast({
title: "输入的钱包地址已存在",
icon: "none",
});
return;
}
this.pendingMoreAddress = addresses.join(",");
this.pendingMoreWalletName = this.trimmedMoreWalletName;
this.moreAddressDialogVisible = false;
this.moreAddressConfirmVisible = true;
},
cancelMoreAddressConfirm() {
this.moreAddressConfirmVisible = false;
this.moreAddressInput = this.pendingMoreAddress.replace(/,/g, "\n");
this.moreWalletName = this.pendingMoreWalletName;
this.moreAddressDialogVisible = true;
},
async saveMoreAddresses() {
if (
!this.canAddMoreWallet ||
!this.pendingMoreAddress ||
this.savingMoreAddress
) {
return;
}
this.savingMoreAddress = true;
try {
await saveAssetWallet(
{
address: this.pendingMoreAddress,
name: this.pendingMoreWalletName,
type: 1,
},
{
showLoading: true,
loadingText: "保存中",
},
);
this.moreAddressConfirmVisible = false;
this.moreAddressInput = "";
this.moreWalletName = "";
this.pendingMoreAddress = "";
this.pendingMoreWalletName = "";
this.showSuccessTip("添加成功!");
await this.loadPage();
} catch (error) {
uni.showToast({
title: error.message || "保存失败",
icon: "none",
});
} finally {
this.savingMoreAddress = false;
}
},
},
};
</script>
<style lang="scss" scoped>
@import "../../styles/tokens.scss";
@import "../../styles/common.scss";
.wallet-page {
min-height: 100vh;
background: #191e32;
}
.wallet-scroll {
min-height: calc(100vh - env(safe-area-inset-top) - 104rpx);
display: flex;
flex-direction: column;
padding: 10rpx 22rpx calc(env(safe-area-inset-bottom) + 36rpx);
}
.wallet-panel {
padding: 22rpx 20rpx 24rpx;
border-radius: 12rpx;
background: #242944;
box-shadow: 0 12rpx 24rpx rgba(8, 13, 30, 0.12);
}
.wallet-panel--more {
margin-top: 18rpx;
}
.wallet-panel__head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12rpx;
}
.wallet-panel__title {
display: flex;
align-items: center;
min-width: 0;
}
.wallet-panel__title-icon {
position: relative;
width: 34rpx;
height: 28rpx;
margin-right: 10rpx;
flex-shrink: 0;
}
.wallet-panel__title-tab {
position: absolute;
left: 5rpx;
top: -4rpx;
width: 16rpx;
height: 10rpx;
border-radius: 6rpx 6rpx 0 0;
background: #b48eff;
}
.wallet-panel__title-body {
position: absolute;
left: 0;
bottom: 0;
width: 34rpx;
height: 22rpx;
border-radius: 6rpx;
background: linear-gradient(135deg, #b48eff 0%, #8c6ef0 100%);
}
.wallet-panel__title-text {
font-size: 28rpx;
font-weight: 700;
color: #ffffff;
}
.wallet-panel__subtitle {
margin-left: 16rpx;
max-width: 280rpx;
font-size: 26rpx;
line-height: 1.4;
text-align: right;
flex-shrink: 0;
color: rgba(174, 183, 211, 0.88);
}
.wallet-panel__content,
.wallet-panel__new {
margin-top: 18rpx;
}
.wallet-panel__address-box {
padding: 30rpx 24rpx;
border-radius: 8rpx;
background: rgba(53, 62, 94, 1);
font-size: 26rpx;
line-height: 1.6;
word-break: break-all;
color: #ffffff;
}
.wallet-panel__footer {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20rpx;
}
.wallet-panel__name {
font-size: 26rpx;
color: rgba(196, 205, 231, 0.88);
}
.wallet-panel__copy {
font-size: 26rpx;
font-weight: 700;
color: #1fb7f9;
}
.wallet-more-list {
margin-top: 18rpx;
}
.wallet-more-item {
padding: 22rpx 24rpx;
border-radius: 8rpx;
background: rgba(53, 62, 94, 1);
}
.wallet-more-item + .wallet-more-item {
margin-top: 14rpx;
}
.wallet-more-item__head {
display: flex;
align-items: center;
justify-content: space-between;
}
.wallet-more-item__name {
font-size: 24rpx;
color: rgba(196, 205, 231, 0.88);
}
.wallet-more-item__address {
display: block;
margin-top: 14rpx;
font-size: 25rpx;
line-height: 1.6;
word-break: break-all;
color: #ffffff;
}
.wallet-more-empty {
display: block;
margin-top: 18rpx;
padding: 28rpx 20rpx;
border-radius: 8rpx;
text-align: center;
font-size: 25rpx;
color: rgba(174, 183, 211, 0.82);
background: rgba(53, 62, 94, 0.58);
}
.wallet-more-action {
display: flex;
align-items: center;
justify-content: center;
height: 76rpx;
margin-top: 18rpx;
border: 1px solid rgba(31, 183, 249, 0.56);
border-radius: 8rpx;
font-size: 27rpx;
font-weight: 600;
color: #1fb7f9;
}
.wallet-more-action--standalone {
flex-shrink: 0;
margin-top: 18rpx;
background: rgba(36, 41, 68, 0.72);
}
.wallet-input {
display: flex;
align-items: center;
padding: 0 20rpx;
height: 94rpx;
border-radius: 10rpx;
background: #191e32;
}
.wallet-input__field {
flex: 1;
min-width: 0;
height: 94rpx;
font-size: 28rpx;
color: #ffffff;
}
.wallet-input__paste {
margin-left: 18rpx;
font-size: 28rpx;
font-weight: 500;
color: #1fb7f9;
}
.wallet-panel__helper {
display: block;
margin-top: 18rpx;
font-size: 26rpx;
line-height: 1.6;
color: rgba(174, 183, 211, 0.82);
}
.wallet-actions {
display: flex;
gap: 20rpx;
margin-top: 180rpx;
padding: 0 10rpx;
}
.wallet-actions--compact {
margin-top: 48rpx;
}
.wallet-actions--single .wallet-button {
max-width: 420rpx;
margin: 0 auto;
}
.get-walleck {
background: #20263e;
margin-top: 48rpx;
padding: 30rpx 28rpx;
border-radius: 8rpx;
}
.get-walleck .title {
font-weight: 500;
font-size: 28rpx;
color: #ffffff;
text-align: center;
margin-bottom: 28rpx;
}
.get-walleck .img {
margin: 12rpx auto 0;
text-align: center;
border-radius: 12rpx;
overflow: hidden;
}
.get-walleck .img:first-of-type {
margin-top: 0;
}
.get-walleck .img image {
width: 100%;
display: block;
}
.wallet-edit-dialog__message {
display: block;
margin-top: 4rpx;
font-size: 30rpx;
line-height: 1.8;
color: #edf2ff;
}
.wallet-edit-dialog__label {
display: block;
margin-top: 4rpx;
font-size: 26rpx;
line-height: 1.6;
color: rgba(220, 228, 250, 0.92);
}
.wallet-edit-dialog__label--address {
margin-top: 24rpx;
}
.wallet-edit-dialog__box {
display: flex;
align-items: center;
margin-top: 26rpx;
padding: 0 20rpx;
min-height: 112rpx;
border-radius: 12rpx;
background: rgba(70, 80, 122, 0.78);
}
.wallet-edit-dialog__box--input {
min-height: 92rpx;
margin-top: 12rpx;
}
.wallet-edit-dialog__box--input .wallet-edit-dialog__input {
min-height: 92rpx;
}
.wallet-edit-dialog__input {
flex: 1;
min-width: 0;
min-height: 112rpx;
font-size: 28rpx;
line-height: 1.6;
color: #ffffff;
}
.wallet-edit-dialog__box--textarea {
align-items: stretch;
min-height: 220rpx;
padding: 18rpx 20rpx;
}
.wallet-edit-dialog__textarea {
width: 100%;
min-height: 184rpx;
font-size: 28rpx;
line-height: 1.7;
color: #ffffff;
}
.wallet-edit-dialog__paste {
margin-left: 18rpx;
font-size: 28rpx;
font-weight: 500;
color: #1fb7f9;
}
.wallet-edit-dialog__desc {
display: block;
margin-top: 26rpx;
font-size: 22rpx;
line-height: 1.8;
color: #F77E57;
}
.wallet-edit-popup ::v-deep .popup-panel {
max-width: 640rpx;
padding: 30rpx 30rpx 32rpx;
border-radius: 12rpx;
background: #20263e;
}
.wallet-edit-popup ::v-deep .popup-panel__close-image {
width: 38rpx;
height: 38rpx;
}
.wallet-edit-popup ::v-deep .popup-panel__footer {
margin-top: 34rpx;
gap: 16rpx;
}
.wallet-edit-popup ::v-deep .popup-panel__btn {
height: 82rpx;
border-radius: 12rpx;
font-size: 32rpx;
}
.wallet-edit-popup ::v-deep .popup-panel__btn--ghost {
border: 1px solid rgba(157, 173, 221, 0.64);
background: rgba(67, 77, 118, 0.92);
}
.wallet-button {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
height: 90rpx;
border-radius: 999rpx;
font-size: 32rpx;
font-weight: 700;
}
.wallet-button--primary {
background: linear-gradient(135deg, #22c2ff 0%, #159de6 100%);
box-shadow: 0 16rpx 30rpx rgba(31, 169, 243, 0.2);
color: #ffffff;
}
.wallet-button--secondary {
border: 1px solid rgba(154, 164, 200, 0.64);
background: rgba(67, 77, 118, 0.92);
color: #ffffff;
}
.wallet-success-tip {
position: fixed;
top: calc(env(safe-area-inset-top) + 132rpx);
left: 50%;
transform: translateX(-50%);
z-index: 99;
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
min-height: 76rpx;
padding: 14rpx 28rpx;
border-radius: 999rpx;
background: rgba(17, 23, 43, 0.96);
box-shadow: 0 10rpx 30rpx rgba(8, 13, 30, 0.38);
}
.wallet-success-tip__icon {
width: 34rpx;
height: 34rpx;
flex-shrink: 0;
}
.wallet-success-tip__text {
font-size: 28rpx;
font-weight: 700;
color: #ffffff;
white-space: nowrap;
}
</style>