feat(wallet): 优化提现与移动账户界面

This commit is contained in:
yml
2026-11-16 18:35:00 +08:00
parent 29a16483ac
commit 4ce104f7e8
6 changed files with 400 additions and 158 deletions
@@ -995,17 +995,18 @@
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 8px;
margin-top: 12px;
padding-top: 10px;
border-top: 1px solid #eeeeec;
margin-top: 5px;
padding-top: 0;
border-top: 0;
}
.hero-level-pill,
.hero-benefits-btn {
display: inline-flex;
align-items: center;
min-height: 28px;
min-height: 22px;
border: 0;
background: transparent;
}
@@ -519,28 +519,28 @@ function resolveAvatarURL(url: string | undefined | null) {
</van-tag>
</div>
<p class="user-meta">ID: {{ displayId }} · {{ maskedPhone }}</p>
<div class="hero-status-row">
<button
v-if="!siteStore.isDistribution"
type="button"
class="hero-level-pill"
@click="router.push('/m/benefits')"
>
<span>成长等级</span>
<strong>{{ session.renterGrowthLevelName }}</strong>
<van-icon name="arrow" :size="10" />
</button>
<div v-else class="hero-level-pill is-store">
<span>所属商城</span>
<strong>{{ siteStore.siteName || '官方商城' }}</strong>
</div>
<button type="button" class="hero-benefits-btn" @click="router.push('/m/benefits')">
VIP 与权益
<van-icon name="arrow" :size="10" />
</button>
</div>
</div>
</div>
<div class="hero-status-row">
<button
v-if="!siteStore.isDistribution"
type="button"
class="hero-level-pill"
@click="router.push('/m/benefits')"
>
<span>成长等级</span>
<strong>{{ session.renterGrowthLevelName }}</strong>
<van-icon name="arrow" :size="10" />
</button>
<div v-else class="hero-level-pill is-store">
<span>所属商城</span>
<strong>{{ siteStore.siteName || '官方商城' }}</strong>
</div>
<button type="button" class="hero-benefits-btn" @click="router.push('/m/benefits')">
VIP 与权益
<van-icon name="arrow" :size="10" />
</button>
</div>
</section>
<section class="asset-overview-card">
@@ -1,28 +1,40 @@
.mobile-withdrawal {
--van-primary-color: #ff6a00;
--van-button-primary-background: #ff6a00;
--van-button-primary-border-color: #ff6a00;
--van-radio-checked-icon-color: #ff6a00;
--van-checkbox-checked-icon-color: #ff6a00;
--van-tag-warning-color: #ff6a00;
min-height: 100vh;
padding: 12px 14px 28px;
background: #fff7ed;
--van-primary-color: #a95522;
--van-button-primary-background: #a95522;
--van-button-primary-border-color: #a95522;
--van-radio-checked-icon-color: #a95522;
--van-checkbox-checked-icon-color: #a95522;
--van-tag-warning-color: #8b6238;
min-height: 100dvh;
padding: 0 12px 24px;
background: #f4f4f2;
}
.page-header {
position: sticky;
top: 0;
z-index: 50;
display: grid;
grid-template-columns: 40px 1fr 40px;
grid-template-columns: 38px minmax(0, 1fr) 38px;
align-items: center;
height: 44px;
margin-bottom: 12px;
height: 52px;
margin: 0 -12px 12px;
padding: 0 10px;
border-bottom: 1px solid #ececea;
background: rgba(255, 255, 255, 0.96);
box-shadow: 0 1px 8px rgba(26, 28, 31, 0.03);
backdrop-filter: blur(12px);
}
.page-header h1 {
margin: 0;
overflow: hidden;
text-align: center;
font-size: 17px;
color: #101828;
font-weight: 700;
color: #24282d;
text-overflow: ellipsis;
white-space: nowrap;
}
.back-btn,
@@ -32,10 +44,10 @@
justify-content: center;
width: 36px;
height: 36px;
border: 0;
border-radius: 18px;
background: #fff;
color: #1f2937;
border: 1px solid #ececea;
border-radius: 8px;
background: #f7f7f5;
color: #4f555b;
}
.refresh-btn {
@@ -44,12 +56,13 @@
.balance-panel {
display: grid;
gap: 6px;
padding: 18px;
gap: 5px;
padding: 16px;
border: 1px solid #e5e4e1;
border-radius: 8px;
background: linear-gradient(135deg, #ff8a1f 0%, #ff5a00 100%);
color: #fff;
box-shadow: 0 14px 28px rgba(255, 106, 0, 0.22);
background: #ffffff;
color: #252a31;
box-shadow: 0 4px 14px rgba(28, 31, 35, 0.035);
}
.site-account-tip {
@@ -58,30 +71,35 @@
width: fit-content;
padding: 2px 8px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.25);
color: #fff;
font-size: 11px;
font-weight: 500;
letter-spacing: 0.5px;
border: 1px solid #ead8cb;
background: #f8f1eb;
color: #96542f;
font-size: 10px;
font-weight: 600;
letter-spacing: 0;
}
.balance-panel span,
.balance-panel small {
color: rgba(255, 255, 255, 0.72);
color: #858a90;
font-size: 12px;
}
.balance-panel strong {
font-size: 31px;
color: #9c542b;
font-size: 32px;
font-weight: 700;
line-height: 1.1;
}
.withdraw-card,
.records-card {
margin-top: 12px;
margin-top: 10px;
padding: 14px;
border: 1px solid #e5e4e1;
border-radius: 8px;
background: #fff;
background: #ffffff;
box-shadow: 0 4px 14px rgba(28, 31, 35, 0.03);
}
.section-title {
@@ -94,8 +112,8 @@
.section-title h2 {
margin: 0;
font-size: 16px;
color: #101828;
font-size: 15px;
color: #252a31;
}
.section-title button {
@@ -104,8 +122,8 @@
gap: 4px;
border: 0;
background: transparent;
color: #ff6a00;
font-size: 13px;
color: #9c6746;
font-size: 12px;
}
.section-title button:disabled {
@@ -126,9 +144,9 @@
.empty-state {
display: grid;
justify-items: center;
gap: 10px;
padding: 24px 0;
color: #98a2b3;
gap: 9px;
padding: 18px 0;
color: #92979c;
}
.empty-state p {
@@ -145,14 +163,14 @@
display: grid;
gap: 8px;
padding: 10px;
border: 1px solid #eaecf0;
border: 1px solid #e8e7e4;
border-radius: 8px;
background: #fff;
background: #ffffff;
}
.account-option.active {
border-color: #ff6a00;
background: #fff7ed;
border-color: #d6b39a;
background: #fcf8f5;
}
.account-select {
@@ -175,8 +193,8 @@
width: 34px;
height: 34px;
border-radius: 8px;
background: #fff3e8;
color: #ff6a00;
background: #f7f1eb;
color: #a65b31;
}
.account-main {
@@ -187,7 +205,7 @@
.account-main strong {
overflow: hidden;
color: #101828;
color: #252a31;
font-size: 14px;
text-overflow: ellipsis;
white-space: nowrap;
@@ -195,7 +213,7 @@
.account-main small {
overflow: hidden;
color: #667085;
color: #858a90;
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
@@ -206,18 +224,18 @@
justify-content: flex-end;
gap: 8px;
padding-top: 8px;
border-top: 1px solid #f2f4f7;
border-top: 1px solid #eeeeec;
}
.account-actions button {
border: 0;
background: transparent;
color: #ff6a00;
color: #8b6a55;
font-size: 12px;
}
.account-actions button.danger {
color: #b42318;
color: #985858;
}
.account-actions button:disabled {
@@ -236,24 +254,24 @@
justify-content: space-between;
gap: 10px;
margin: 10px 0;
color: #667085;
color: #7c8187;
font-size: 12px;
}
.amount-meta button {
border: 0;
background: transparent;
color: #ff6a00;
color: #9c6746;
}
.amount-preview {
padding: 10px 12px;
border-radius: 8px;
background: #f8fafc;
background: #f8f8f6;
}
.amount-preview strong {
color: #ff6a00;
color: #9c542b;
font-size: 18px;
}
@@ -268,7 +286,7 @@
.record-item {
padding: 12px;
border: 1px solid #eaecf0;
border: 1px solid #e8e7e4;
border-radius: 8px;
background: #fff;
}
@@ -283,13 +301,13 @@
.record-top strong {
display: block;
color: #101828;
color: #252a31;
font-size: 18px;
}
.record-top small,
.record-meta {
color: #98a2b3;
color: #92979c;
font-size: 12px;
}
@@ -299,17 +317,31 @@
.record-remark {
margin: 10px 0 0;
color: #b42318;
color: #985858;
font-size: 12px;
}
.cancel-btn {
margin-top: 10px;
padding: 6px 10px;
border: 1px solid #fecdca;
border-radius: 999px;
background: #fff;
color: #b42318;
border: 1px solid #e6d0d0;
border-radius: 6px;
background: #ffffff;
color: #985858;
font-size: 12px;
}
.records-card :deep(.van-empty) {
padding: 18px 0;
}
.records-card :deep(.van-empty__image) {
width: 82px;
height: 82px;
}
.records-card :deep(.van-empty__description) {
color: #92979c;
font-size: 12px;
}
@@ -358,8 +390,8 @@
height: 17px;
padding: 0 6px;
border-radius: 999px;
background: #fff7ed;
color: #c2410c;
background: #f7f1eb;
color: #96542f;
font-size: 11px;
font-weight: 700;
line-height: 1;
@@ -367,7 +399,7 @@
.type-tip {
margin: 0 0 12px;
color: #8a5a13;
color: #876b52;
font-size: 12px;
line-height: 1.5;
}
@@ -376,8 +408,9 @@
margin: 12px 0;
padding: 10px 12px;
border-radius: 8px;
background: #fffbeb;
color: #92400e;
border: 1px solid #e9e4de;
background: #f8f7f5;
color: #74685e;
font-size: 12px;
line-height: 1.6;
}
@@ -389,16 +422,16 @@
align-items: center;
margin: 12px 0;
padding: 10px;
border: 1px solid #fed7aa;
border-radius: 10px;
background: #fff7ed;
color: #92400e;
border: 1px solid #e7ddd5;
border-radius: 8px;
background: #faf8f6;
color: #74685e;
}
.receive-qr-tip strong {
display: block;
margin-bottom: 5px;
color: #c2410c;
color: #8d5c3d;
font-size: 13px;
}
@@ -411,7 +444,7 @@
.receive-qr-tip img {
display: block;
width: 108px;
border: 1px solid #fde6c8;
border: 1px solid #e6ddd5;
border-radius: 8px;
background: #ffffff;
}
@@ -448,11 +481,11 @@
overflow: hidden;
aspect-ratio: 1;
border-radius: 8px;
background: #fff7ed;
background: #f8f6f3;
}
.certificate-item {
border: 1px solid #fed7aa;
border: 1px solid #e6ddd5;
}
.certificate-item img,
@@ -485,8 +518,8 @@
align-items: center;
justify-content: center;
gap: 6px;
border: 1px dashed #ff9f43;
color: #ff6a00;
border: 1px dashed #c9a58c;
color: #9c6746;
font-size: 12px;
}
@@ -647,7 +647,7 @@ function statusType(status: string): 'primary' | 'success' | 'danger' | 'warning
:disabled="uploadingCertificate"
@change="handleCertificateUpload"
/>
<van-loading v-if="uploadingCertificate" size="18" color="#ff6a00" />
<van-loading v-if="uploadingCertificate" size="18" color="#a95522" />
<van-icon v-else name="photograph" :size="22" />
<span>{{ uploadingCertificate ? '上传中' : '上传图片' }}</span>
</label>
@@ -173,6 +173,7 @@ function accountTypeLabel(type: string) {
<template>
<div class="withdrawal-page">
<div class="page-header">
<p class="eyebrow">WITHDRAWAL</p>
<h2>
提现
<el-tag
@@ -194,8 +195,7 @@ function accountTypeLabel(type: string) {
</p>
</div>
<!-- 余额卡片 -->
<el-card class="balance-card" shadow="never">
<section class="balance-summary">
<div class="balance-info">
<div class="balance-item">
<div class="balance-label">
@@ -212,15 +212,15 @@ function accountTypeLabel(type: string) {
<div class="balance-value frozen">¥{{ formatCent(account?.frozen_balance_cent) }}</div>
</div>
</div>
</el-card>
</section>
<!-- 提现表单 -->
<el-card class="withdraw-form-card" shadow="never">
<template #header>
<div class="card-header">
<span>申请提现</span>
<section class="withdraw-panel">
<div class="panel-heading">
<div>
<h3>申请提现</h3>
<p>选择收款账号并填写提现金额。</p>
</div>
</template>
</div>
<div v-if="paymentAccounts.length === 0" class="no-accounts">
<el-empty description="还没有收款账号">
@@ -253,7 +253,7 @@ function accountTypeLabel(type: string) {
</div>
</el-option>
</el-select>
<div style="margin-top: 8px; display: flex; gap: 8px">
<div class="account-actions">
<el-button size="small" @click="goToPaymentAccounts"> 添加收款账号 </el-button>
<el-button size="small" text @click="goToPaymentAccounts"> 管理收款账号 </el-button>
</div>
@@ -269,7 +269,7 @@ function accountTypeLabel(type: string) {
>
<template #prefix>¥</template>
</el-input>
<div style="margin-top: 8px; font-size: 13px; color: #999">
<div class="amount-hint">
单笔限额:¥{{ MIN_AMOUNT }} - ¥{{ MAX_AMOUNT }},手续费:0%
</div>
</el-form-item>
@@ -289,16 +289,16 @@ function accountTypeLabel(type: string) {
type="error"
:closable="false"
show-icon
style="margin-bottom: 16px"
class="form-alert"
>
余额不足,可用余额:¥{{ formatCent(account.available_balance_cent) }}
</el-alert>
<el-alert type="info" :closable="false" show-icon style="margin-bottom: 16px">
<el-alert type="info" :closable="false" show-icon class="form-alert">
<template #title>
<div style="font-size: 13px">
<div class="withdraw-notes">
<strong>提现说明</strong>
<ul style="margin: 8px 0 0; padding-left: 20px">
<ul>
<li>提现申请提交后,将冻结相应金额</li>
<li>财务审核通过后,将手动转账到您的收款账号</li>
<li>正常情况下,1-3个工作日内完成转账</li>
@@ -321,29 +321,27 @@ function accountTypeLabel(type: string) {
</el-form-item>
</el-form>
</div>
</el-card>
</section>
<!-- 提现记录 -->
<el-card class="withdrawal-records-card" shadow="never">
<template #header>
<div class="card-header">
<span>提现记录</span>
<section class="records-panel">
<div class="panel-heading">
<div>
<h3>提现记录</h3>
<p>查看审核状态与历史申请。</p>
</div>
</template>
</div>
<el-table v-loading="loading" :data="withdrawals" stripe>
<el-table-column prop="withdraw_no" label="提现单号" min-width="180" />
<el-table-column label="提现金额" width="120">
<template #default="{ row }">
<span style="color: #f56c6c; font-weight: 600">
¥{{ formatCent(row.amount_cent) }}
</span>
<span class="record-amount"> ¥{{ formatCent(row.amount_cent) }} </span>
</template>
</el-table-column>
<el-table-column label="收款方式" width="150">
<template #default="{ row }">
<div>{{ accountTypeLabel(row.account_type) }}</div>
<div style="font-size: 12px; color: #999">{{ row.account_no }}</div>
<div class="record-account-no">{{ row.account_no }}</div>
</template>
</el-table-column>
<el-table-column label="状态" width="100">
@@ -370,7 +368,7 @@ function accountTypeLabel(type: string) {
>
取消
</el-button>
<span v-else style="color: #999">-</span>
<span v-else class="record-empty">-</span>
</template>
</el-table-column>
</el-table>
@@ -381,22 +379,38 @@ function accountTypeLabel(type: string) {
v-model:page-size="pageSize"
:total="total"
layout="total, prev, pager, next"
style="margin-top: 16px; justify-content: center"
class="records-pagination"
@current-change="loadData"
/>
</el-card>
</section>
</div>
</template>
<style scoped>
.withdrawal-page {
max-width: 1200px;
max-width: 1080px;
margin: 0 auto;
padding: 24px;
color: #252a31;
--el-color-primary: #a95522;
--el-color-primary-dark-2: #8d461c;
--el-color-primary-light-3: #bd764c;
--el-color-primary-light-5: #d1a084;
--el-color-primary-light-7: #e4c9b8;
--el-color-primary-light-8: #eeded3;
--el-color-primary-light-9: #f7f0eb;
}
.page-header {
margin-bottom: 24px;
margin-bottom: 18px;
}
.eyebrow {
margin: 0 0 5px;
color: #a95522;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
}
.distribution-site-tag {
@@ -406,69 +420,261 @@ function accountTypeLabel(type: string) {
}
.page-header h2 {
margin: 0 0 8px;
font-size: 24px;
font-weight: 600;
margin: 0 0 6px;
color: #252a31;
font-size: 28px;
font-weight: 700;
}
.page-desc {
margin: 0;
color: #666;
font-size: 14px;
color: #747980;
font-size: 13px;
}
.balance-card {
margin-bottom: 20px;
.balance-summary,
.withdraw-panel,
.records-panel {
margin-bottom: 16px;
border: 1px solid #e5e4e1;
border-radius: 8px;
background: #ffffff;
box-shadow: 0 5px 18px rgba(28, 31, 35, 0.035);
}
.balance-summary {
padding: 18px 20px;
}
.balance-info {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 24px;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0;
}
.balance-item {
text-align: center;
min-width: 0;
padding: 2px 22px;
text-align: left;
}
.balance-item:first-child {
padding-left: 0;
}
.balance-item + .balance-item {
border-left: 1px solid #ececea;
}
.balance-label {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
font-size: 14px;
color: #666;
margin-bottom: 8px;
margin-bottom: 7px;
color: #70757b;
font-size: 12px;
font-weight: 600;
}
.balance-value {
font-size: 32px;
font-weight: 600;
color: #67c23a;
color: #9c542b;
font-size: 30px;
font-weight: 700;
line-height: 1.2;
}
.balance-value.frozen {
color: #909399;
color: #454b52;
}
.withdraw-form-card,
.withdrawal-records-card {
margin-bottom: 20px;
.withdraw-panel,
.records-panel {
padding: 20px;
}
.card-header {
.panel-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 16px;
padding-bottom: 13px;
border-bottom: 1px solid #eeeeec;
}
.panel-heading h3 {
margin: 0;
color: #252a31;
font-size: 16px;
font-weight: 600;
font-weight: 700;
}
.panel-heading p {
margin: 4px 0 0;
color: #858a90;
font-size: 12px;
}
.no-accounts {
padding: 40px 0;
padding: 28px 0;
text-align: center;
}
.actual-amount {
font-size: 28px;
color: #9c542b;
font-size: 24px;
font-weight: 700;
}
.account-actions {
display: flex;
gap: 8px;
margin-top: 8px;
}
.amount-hint {
margin-top: 8px;
color: #8a8f95;
font-size: 12px;
}
.form-alert {
margin-bottom: 16px;
}
.withdraw-notes {
font-size: 12px;
}
.withdraw-notes ul {
margin: 7px 0 0;
padding-left: 18px;
line-height: 1.7;
}
.withdrawal-page :deep(.el-form-item__label) {
color: #5f656c;
font-size: 13px;
}
.withdrawal-page :deep(.el-input__wrapper),
.withdrawal-page :deep(.el-select__wrapper) {
border-radius: 6px;
box-shadow: 0 0 0 1px #dededb inset;
}
.withdrawal-page :deep(.el-input__wrapper.is-focus),
.withdrawal-page :deep(.el-select__wrapper.is-focused) {
box-shadow: 0 0 0 1px #b87a53 inset;
}
.withdrawal-page :deep(.el-button--primary:not(.is-link):not(.is-text)) {
border-color: #a95522 !important;
background-color: #a95522 !important;
color: #ffffff !important;
}
.withdraw-panel :deep(.el-alert--info) {
border: 1px solid #e8e5e1;
background: #f8f7f5;
color: #666b71;
}
.withdraw-panel :deep(.el-alert--info .el-alert__icon) {
color: #8b7362;
}
.records-panel :deep(.el-table) {
--el-table-border-color: #eeeeec;
--el-table-header-bg-color: #fafafa;
--el-table-row-hover-bg-color: #faf8f6;
color: #454b52;
}
.records-panel :deep(.el-table th.el-table__cell) {
color: #71767c;
font-size: 12px;
font-weight: 600;
color: #67c23a;
}
.records-panel :deep(.el-tag--primary) {
border-color: #e4c9b8;
background: #f7f0eb;
color: #8d461c;
}
.records-panel :deep(.el-tag--warning) {
border-color: #e8dec9;
background: #f8f4ec;
color: #806536;
}
.records-panel :deep(.el-tag--success) {
border-color: #dce7de;
background: #f1f7f2;
color: #55705d;
}
.records-panel :deep(.el-tag--danger) {
border-color: #eadada;
background: #faf2f2;
color: #985858;
}
.records-panel :deep(.el-tag--info) {
border-color: #e2e3e4;
background: #f5f5f4;
color: #73787e;
}
.record-amount {
color: #9c542b;
font-weight: 700;
}
.record-account-no {
color: #8a8f95;
font-size: 11px;
}
.record-empty {
color: #a0a4a8;
}
.records-pagination {
justify-content: center;
margin-top: 16px;
}
.records-pagination :deep(.el-pager li.is-active) {
background: #a95522;
color: #ffffff;
}
.records-pagination :deep(.el-pager li:hover),
.records-pagination :deep(.btn-prev:hover),
.records-pagination :deep(.btn-next:hover) {
color: #a95522;
}
@media (max-width: 760px) {
.withdrawal-page {
padding: 16px;
}
.balance-info {
grid-template-columns: 1fr;
}
.balance-item {
padding: 0;
}
.balance-item + .balance-item {
margin-top: 14px;
padding-top: 14px;
border-top: 1px solid #ececea;
border-left: 0;
}
}
</style>