feat(ui): 统一消息钱包与权益中心视觉
This commit is contained in:
@@ -346,7 +346,7 @@ function formatBps(value: number | undefined, fallback: number) {
|
||||
max-width: none;
|
||||
min-height: 100vh;
|
||||
padding: 28px max(20px, calc((100% - 1180px) / 2)) 56px;
|
||||
background: #f5f7fb;
|
||||
background: transparent;
|
||||
color: #20242a;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { Bell, BellFilled } from '@element-plus/icons-vue'
|
||||
import { Bell, BellFilled, Microphone, Mute } from '@element-plus/icons-vue'
|
||||
import { useDesktopNotification } from '../composables/useDesktopNotification'
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -16,15 +16,9 @@ const statusText = computed(() => {
|
||||
return '未开启'
|
||||
})
|
||||
|
||||
const statusType = computed(() => {
|
||||
if (notification.permission.value === 'granted') return 'success'
|
||||
if (notification.permission.value === 'denied') return 'danger'
|
||||
return 'info'
|
||||
})
|
||||
|
||||
const voiceStatusText = computed(() => {
|
||||
if (!notification.isSpeechSupported) return '语音不支持'
|
||||
return notification.voiceEnabled.value ? '语音已开' : '语音关闭'
|
||||
return notification.voiceEnabled.value ? '已开启' : '已关闭'
|
||||
})
|
||||
|
||||
async function toggleNotification() {
|
||||
@@ -46,37 +40,48 @@ function toggleVoice() {
|
||||
|
||||
<template>
|
||||
<div class="notification-settings">
|
||||
<div class="setting-group">
|
||||
<el-tooltip content="接收新消息的桌面通知" placement="bottom">
|
||||
<el-button
|
||||
:icon="notification.permission.value === 'granted' ? BellFilled : Bell"
|
||||
:type="notification.permission.value === 'granted' ? 'primary' : 'default'"
|
||||
:disabled="!notification.isSupported || notification.permission.value === 'denied'"
|
||||
circle
|
||||
@click="toggleNotification"
|
||||
>
|
||||
<template #default>
|
||||
<el-badge
|
||||
v-if="notification.permission.value !== 'granted' && notification.isSupported"
|
||||
is-dot
|
||||
:type="statusType"
|
||||
/>
|
||||
</template>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<span class="status-text">{{ statusText }}</span>
|
||||
</div>
|
||||
<el-tooltip content="接收新消息的桌面通知" placement="bottom">
|
||||
<button
|
||||
type="button"
|
||||
class="setting-toggle"
|
||||
:class="{ 'is-active': notification.permission.value === 'granted' }"
|
||||
:disabled="!notification.isSupported"
|
||||
:aria-pressed="notification.permission.value === 'granted'"
|
||||
@click="toggleNotification"
|
||||
>
|
||||
<span class="setting-icon">
|
||||
<el-icon>
|
||||
<BellFilled v-if="notification.permission.value === 'granted'" />
|
||||
<Bell v-else />
|
||||
</el-icon>
|
||||
</span>
|
||||
<span class="setting-copy">
|
||||
<strong>通知</strong>
|
||||
<small>{{ statusText }}</small>
|
||||
</span>
|
||||
</button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip content="开启后,新消息会自动语音播报" placement="bottom">
|
||||
<el-button
|
||||
size="small"
|
||||
:type="notification.voiceEnabled.value ? 'success' : 'default'"
|
||||
<button
|
||||
type="button"
|
||||
class="setting-toggle"
|
||||
:class="{ 'is-active': notification.voiceEnabled.value }"
|
||||
:disabled="!notification.isSpeechSupported"
|
||||
plain
|
||||
:aria-pressed="notification.voiceEnabled.value"
|
||||
@click="toggleVoice"
|
||||
>
|
||||
{{ voiceStatusText }}
|
||||
</el-button>
|
||||
<span class="setting-icon">
|
||||
<el-icon>
|
||||
<Microphone v-if="notification.voiceEnabled.value" />
|
||||
<Mute v-else />
|
||||
</el-icon>
|
||||
</span>
|
||||
<span class="setting-copy">
|
||||
<strong>声音</strong>
|
||||
<small>{{ voiceStatusText }}</small>
|
||||
</span>
|
||||
</button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
@@ -86,17 +91,78 @@ function toggleVoice() {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.setting-group {
|
||||
.setting-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-height: 34px;
|
||||
padding: 4px 9px 4px 7px;
|
||||
border: 1px solid #f0e4da;
|
||||
border-radius: 7px;
|
||||
background: #ffffff;
|
||||
color: #725f52;
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
border-color 0.15s,
|
||||
background 0.15s,
|
||||
color 0.15s;
|
||||
}
|
||||
|
||||
.status-text {
|
||||
color: #8a94a6;
|
||||
.setting-toggle:hover:not(:disabled) {
|
||||
border-color: #ffc899;
|
||||
background: #fff8f3;
|
||||
color: #c2410c;
|
||||
}
|
||||
|
||||
.setting-toggle.is-active {
|
||||
border-color: #ffd1a8;
|
||||
background: var(--el-color-primary-light-9, #fff2e8);
|
||||
color: var(--el-color-primary, #ff7a00);
|
||||
}
|
||||
|
||||
.setting-toggle:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.setting-icon {
|
||||
display: grid;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
place-items: center;
|
||||
border-radius: 6px;
|
||||
background: #f8f2ed;
|
||||
color: #8b7565;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.setting-toggle.is-active .setting-icon {
|
||||
background: #ffffff;
|
||||
color: var(--el-color-primary, #ff7a00);
|
||||
}
|
||||
|
||||
.setting-copy {
|
||||
display: grid;
|
||||
gap: 1px;
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.setting-copy strong {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.setting-copy small {
|
||||
color: #9a887b;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.setting-toggle.is-active .setting-copy small {
|
||||
color: var(--el-color-primary-dark-2, #d65f00);
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,7 @@ import { useDistributionSiteStore } from '@/stores/distributionSite'
|
||||
|
||||
const router = useRouter()
|
||||
const distributionStore = useDistributionSiteStore()
|
||||
const currentUserId = Number(localStorage.getItem('user_id') || 0)
|
||||
const loading = ref(false)
|
||||
const refreshing = ref(false)
|
||||
const finished = ref(false)
|
||||
@@ -73,6 +74,29 @@ function roleLabel(role: string) {
|
||||
return map[role] || '成员'
|
||||
}
|
||||
|
||||
function conversationTypeLabel(item: ChatConversation) {
|
||||
if (item.type === 'listing_group') return '账号群'
|
||||
if (item.type === 'order_group' || item.order_id) return '订单'
|
||||
return '平台客服'
|
||||
}
|
||||
|
||||
function conversationAvatar(item: ChatConversation) {
|
||||
const candidates =
|
||||
item.participants?.filter(
|
||||
participant => participant.participant_type === 'user' && participant.avatar_url
|
||||
) || []
|
||||
const otherUser = candidates.find(participant => participant.participant_id !== currentUserId)
|
||||
return resolveAvatarURL((otherUser || candidates[0])?.avatar_url)
|
||||
}
|
||||
|
||||
function resolveAvatarURL(url: string | undefined | null) {
|
||||
if (!url) return ''
|
||||
if (url.includes('/api/files/object?key=avatar/')) {
|
||||
return url.replace('/api/files/object', '/api/public/files/object')
|
||||
}
|
||||
return url
|
||||
}
|
||||
|
||||
function previewText(item: ChatConversation) {
|
||||
return (
|
||||
item.last_message_preview ||
|
||||
@@ -94,9 +118,23 @@ const unreadTotal = computed(() =>
|
||||
<h1>
|
||||
{{ distributionStore.isDistribution ? `${distributionStore.siteName} · 消息` : '消息' }}
|
||||
</h1>
|
||||
<span class="header-count">{{ unreadTotal > 0 ? `${unreadTotal} 未读` : '' }}</span>
|
||||
<span class="header-count" :class="{ 'is-clear': unreadTotal === 0 }">
|
||||
{{ unreadTotal > 0 ? `${unreadTotal} 未读` : '全部已读' }}
|
||||
</span>
|
||||
</header>
|
||||
|
||||
<section class="inbox-summary">
|
||||
<span class="summary-icon">
|
||||
<van-icon name="chat-o" :size="19" />
|
||||
</span>
|
||||
<div class="summary-copy">
|
||||
<strong>会话消息</strong>
|
||||
<span>共 {{ total }} 个会话</span>
|
||||
</div>
|
||||
<span v-if="unreadTotal > 0" class="summary-unread">{{ unreadTotal }} 条未读</span>
|
||||
<span v-else class="summary-read">已读</span>
|
||||
</section>
|
||||
|
||||
<van-pull-refresh v-model="refreshing" class="scroll-container" @refresh="onRefresh">
|
||||
<van-list
|
||||
v-model:loading="loading"
|
||||
@@ -116,13 +154,14 @@ const unreadTotal = computed(() =>
|
||||
v-for="item in conversations"
|
||||
:key="item.id"
|
||||
class="conversation-item"
|
||||
:class="{ 'is-unread': item.unread_count > 0 }"
|
||||
type="button"
|
||||
@click="openConversation(item)"
|
||||
>
|
||||
<div class="avatar-stack">
|
||||
<span class="avatar main">{{ roleLabel(item.role).slice(0, 1) }}</span>
|
||||
<span class="avatar support">客</span>
|
||||
</div>
|
||||
<span class="conversation-avatar">
|
||||
<img v-if="conversationAvatar(item)" :src="conversationAvatar(item)" alt="" />
|
||||
<van-icon v-else name="chat-o" :size="20" />
|
||||
</span>
|
||||
<div class="conversation-main">
|
||||
<div class="conversation-title-row">
|
||||
<h2>{{ item.title }}</h2>
|
||||
@@ -132,9 +171,10 @@ const unreadTotal = computed(() =>
|
||||
</div>
|
||||
<div class="conversation-meta">
|
||||
<span class="role-chip">{{ roleLabel(item.role) }}</span>
|
||||
<span>{{ item.order_id ? `订单 #${item.order_id}` : '平台客服' }}</span>
|
||||
<span class="conversation-type">{{ conversationTypeLabel(item) }}</span>
|
||||
<span v-if="item.needs_reply" class="reply-chip">待回复</span>
|
||||
</div>
|
||||
<p>{{ previewText(item) }}</p>
|
||||
<p class="conversation-preview">{{ previewText(item) }}</p>
|
||||
</div>
|
||||
<span v-if="item.unread_count > 0" class="unread-badge">
|
||||
{{ item.unread_count > 99 ? '99+' : item.unread_count }}
|
||||
@@ -151,8 +191,9 @@ const unreadTotal = computed(() =>
|
||||
<style scoped>
|
||||
.mobile-messages {
|
||||
min-height: 100dvh;
|
||||
background: #f5f7fb;
|
||||
padding-bottom: calc(62px + env(safe-area-inset-bottom));
|
||||
padding-bottom: calc(52px + env(safe-area-inset-bottom));
|
||||
background: #f4f4f2;
|
||||
color: #252a31;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
@@ -160,103 +201,188 @@ const unreadTotal = computed(() =>
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
display: grid;
|
||||
grid-template-columns: 44px 1fr 72px;
|
||||
grid-template-columns: 44px minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
height: 48px;
|
||||
padding: 0 8px;
|
||||
height: 52px;
|
||||
padding: 0 10px;
|
||||
background: rgba(255, 255, 255, 0.96);
|
||||
border-bottom: 1px solid #edf0f5;
|
||||
backdrop-filter: blur(10px);
|
||||
border-bottom: 1px solid #ececea;
|
||||
box-shadow: 0 1px 8px rgba(26, 28, 31, 0.03);
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
|
||||
.page-header h1 {
|
||||
margin: 0;
|
||||
color: #111827;
|
||||
overflow: hidden;
|
||||
color: #24282d;
|
||||
font-size: 17px;
|
||||
font-weight: 800;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
display: grid;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
place-items: center;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #374151;
|
||||
border: 1px solid #ececea;
|
||||
border-radius: 8px;
|
||||
background: #f7f7f5;
|
||||
color: #4f555b;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.header-count {
|
||||
color: #ef4444;
|
||||
font-size: 12px;
|
||||
min-width: 52px;
|
||||
padding: 4px 8px;
|
||||
border: 1px solid #ead8cb;
|
||||
border-radius: 999px;
|
||||
background: #f8f1eb;
|
||||
color: #9c542b;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
text-align: right;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.header-count.is-clear {
|
||||
border-color: #e8e8e6;
|
||||
background: #f6f6f4;
|
||||
color: #8a8e93;
|
||||
}
|
||||
|
||||
.inbox-summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin: 12px 12px 0;
|
||||
padding: 11px 12px;
|
||||
border: 1px solid #e7e6e3;
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 4px 14px rgba(28, 31, 35, 0.035);
|
||||
}
|
||||
|
||||
.summary-icon {
|
||||
display: grid;
|
||||
flex: 0 0 34px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
place-items: center;
|
||||
border-radius: 8px;
|
||||
background: #f7f1eb;
|
||||
color: #a65b31;
|
||||
}
|
||||
|
||||
.summary-copy {
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.summary-copy strong {
|
||||
color: #2a2f35;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.summary-copy span {
|
||||
color: #858a90;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.summary-unread,
|
||||
.summary-read {
|
||||
margin-left: auto;
|
||||
padding: 3px 7px;
|
||||
border-radius: 999px;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.summary-unread {
|
||||
background: #f8eee6;
|
||||
color: #9c542b;
|
||||
}
|
||||
|
||||
.summary-read {
|
||||
background: #f4f4f2;
|
||||
color: #858a90;
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
min-height: calc(100dvh - 48px - 62px - env(safe-area-inset-bottom));
|
||||
min-height: calc(100dvh - 52px - 52px - env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
padding-top: 90px;
|
||||
padding-top: 72px;
|
||||
}
|
||||
|
||||
.conversation-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
padding: 12px;
|
||||
gap: 8px;
|
||||
padding: 10px 12px 20px;
|
||||
}
|
||||
|
||||
.conversation-item {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: 52px minmax(0, 1fr);
|
||||
gap: 10px;
|
||||
grid-template-columns: 44px minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
border: 1px solid #e8edf3;
|
||||
border: 1px solid #e7e6e3;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
background: #ffffff;
|
||||
text-align: left;
|
||||
box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
|
||||
box-shadow: 0 4px 14px rgba(28, 31, 35, 0.035);
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background 0.15s,
|
||||
border-color 0.15s;
|
||||
}
|
||||
|
||||
.conversation-item.is-unread {
|
||||
border-color: #e5d5c9;
|
||||
}
|
||||
|
||||
.conversation-item.is-unread::before {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
bottom: 12px;
|
||||
left: 0;
|
||||
width: 3px;
|
||||
border-radius: 0 3px 3px 0;
|
||||
background: #b96538;
|
||||
content: '';
|
||||
}
|
||||
|
||||
.conversation-item:active {
|
||||
transform: scale(0.99);
|
||||
background: #faf8f6;
|
||||
}
|
||||
|
||||
.avatar-stack {
|
||||
position: relative;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
.conversation-avatar {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.avatar.main {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
background: #1477ff;
|
||||
font-size: 16px;
|
||||
place-items: center;
|
||||
overflow: hidden;
|
||||
border: 1px solid #eadfd7;
|
||||
border-radius: 8px;
|
||||
background: #f8f2ed;
|
||||
color: #a65b31;
|
||||
}
|
||||
|
||||
.avatar.support {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border: 2px solid #fff;
|
||||
background: #10b981;
|
||||
font-size: 11px;
|
||||
.conversation-avatar img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.conversation-main {
|
||||
@@ -274,59 +400,79 @@ const unreadTotal = computed(() =>
|
||||
min-width: 0;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
color: #111827;
|
||||
font-size: 15px;
|
||||
font-weight: 800;
|
||||
color: #252a31;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.conversation-time {
|
||||
flex: none;
|
||||
color: #9ca3af;
|
||||
font-size: 11px;
|
||||
color: #95999e;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.conversation-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin-top: 5px;
|
||||
color: #6b7280;
|
||||
font-size: 11px;
|
||||
color: #74797f;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.role-chip {
|
||||
padding: 1px 6px;
|
||||
border-radius: 999px;
|
||||
background: #eef6ff;
|
||||
color: #1477ff;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
background: #f3f3f1;
|
||||
color: #656b71;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.conversation-type {
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
background: #f8f1eb;
|
||||
color: #985c38;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.reply-chip {
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
background: #f8ece3;
|
||||
color: #a45227;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.conversation-main p {
|
||||
.conversation-preview {
|
||||
margin: 7px 0 0;
|
||||
overflow: hidden;
|
||||
color: #4b5563;
|
||||
font-size: 13px;
|
||||
line-height: 1.4;
|
||||
color: #666c72;
|
||||
font-size: 12px;
|
||||
line-height: 1.45;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.unread-badge {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
min-width: 18px;
|
||||
height: 18px;
|
||||
padding: 0 5px;
|
||||
border-radius: 9px;
|
||||
background: #ef4444;
|
||||
min-width: 20px;
|
||||
height: 20px;
|
||||
padding: 0 6px;
|
||||
border-radius: 999px;
|
||||
background: #b96538;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
font-weight: 800;
|
||||
line-height: 18px;
|
||||
font-weight: 700;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.scroll-container :deep(.van-list__finished-text) {
|
||||
padding: 18px 0 4px;
|
||||
color: #9a9ea3;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -40,17 +40,10 @@ const walletMetrics = computed(() => {
|
||||
return []
|
||||
}
|
||||
return [
|
||||
{
|
||||
label: '可用余额',
|
||||
value: formatCentWithSymbol(account.value.available_balance_cent),
|
||||
hint: '卖家结算收入累计到此账户',
|
||||
icon: WalletIcon,
|
||||
tone: 'available',
|
||||
},
|
||||
{
|
||||
label: '冻结余额',
|
||||
value: formatCentWithSymbol(account.value.frozen_balance_cent),
|
||||
hint: '提现冻结及优质号主保证金',
|
||||
hint: '提现冻结与号主保证金',
|
||||
icon: Lock,
|
||||
tone: 'frozen',
|
||||
},
|
||||
@@ -61,6 +54,13 @@ const walletMetrics = computed(() => {
|
||||
icon: CircleCheck,
|
||||
tone: account.value.status === 'active' ? 'status' : 'warning',
|
||||
},
|
||||
{
|
||||
label: '流水记录',
|
||||
value: `${total.value} 笔`,
|
||||
hint: '当前账户全部资金变动',
|
||||
icon: Tickets,
|
||||
tone: 'ledger',
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
@@ -95,16 +95,6 @@ function handleWithdraw() {
|
||||
router.push('/wallet/withdrawal')
|
||||
}
|
||||
|
||||
function directionTone(direction: string) {
|
||||
const map: Record<string, string> = {
|
||||
in: 'success',
|
||||
out: 'danger',
|
||||
freeze: 'warning',
|
||||
unfreeze: 'info',
|
||||
}
|
||||
return map[direction] || 'info'
|
||||
}
|
||||
|
||||
function amountPrefix(direction: string) {
|
||||
if (direction === 'in' || direction === 'unfreeze') return '+'
|
||||
if (direction === 'out' || direction === 'freeze') return '-'
|
||||
@@ -114,7 +104,7 @@ function amountPrefix(direction: string) {
|
||||
|
||||
<template>
|
||||
<section class="page wallet-page" v-loading="loading">
|
||||
<div class="wallet-hero">
|
||||
<div class="wallet-header">
|
||||
<div class="page-header">
|
||||
<p class="eyebrow">
|
||||
我的钱包
|
||||
@@ -143,120 +133,140 @@ function amountPrefix(direction: string) {
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="wallet-hero-action">
|
||||
<span>当前可用</span>
|
||||
<strong>{{
|
||||
account ? formatCentWithSymbol(account.available_balance_cent) : '¥0.0'
|
||||
}}</strong>
|
||||
<el-button class="withdraw-button" :icon="Money" type="primary" @click="handleWithdraw">
|
||||
申请提现
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="account" class="wallet-metric-grid">
|
||||
<div
|
||||
v-for="item in walletMetrics"
|
||||
:key="item.label"
|
||||
class="wallet-metric-card"
|
||||
:class="`is-${item.tone}`"
|
||||
>
|
||||
<div class="metric-icon">
|
||||
<el-icon><component :is="item.icon" /></el-icon>
|
||||
<div v-if="account" class="wallet-overview">
|
||||
<div class="wallet-balance-block">
|
||||
<div class="balance-label">
|
||||
<span class="balance-icon">
|
||||
<el-icon><WalletIcon /></el-icon>
|
||||
</span>
|
||||
<span>当前可用余额</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ item.label }}</span>
|
||||
<strong>{{ formatCentWithSymbol(account.available_balance_cent) }}</strong>
|
||||
<p>卖家结算收入会进入当前站点钱包,可直接申请提现。</p>
|
||||
<button type="button" class="withdraw-button" @click="handleWithdraw">
|
||||
<el-icon><Money /></el-icon>
|
||||
申请提现
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="wallet-metric-grid">
|
||||
<div
|
||||
v-for="item in walletMetrics"
|
||||
:key="item.label"
|
||||
class="wallet-metric-item"
|
||||
:class="`is-${item.tone}`"
|
||||
>
|
||||
<span class="metric-label">
|
||||
<el-icon><component :is="item.icon" /></el-icon>
|
||||
{{ item.label }}
|
||||
</span>
|
||||
<strong>{{ item.value }}</strong>
|
||||
<small>{{ item.hint }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wallet-workspace">
|
||||
<section class="ledger-summary-card">
|
||||
<div class="panel-title">
|
||||
<div class="panel-title-icon is-blue">
|
||||
<section class="wallet-ledger-panel">
|
||||
<div class="ledger-toolbar">
|
||||
<div class="ledger-heading">
|
||||
<span class="ledger-heading-icon">
|
||||
<el-icon><Tickets /></el-icon>
|
||||
</div>
|
||||
</span>
|
||||
<div>
|
||||
<h2>资金流水</h2>
|
||||
<p>共 {{ total }} 条记录,最近变动优先展示。</p>
|
||||
<p>共 {{ total }} 条资金变动,最近记录优先展示。</p>
|
||||
</div>
|
||||
</div>
|
||||
<el-button :icon="Refresh" :loading="loading" @click="loadWallet">刷新</el-button>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section class="wallet-ledger-table" role="table" aria-label="资金流水">
|
||||
<div class="ledger-grid ledger-header" role="row">
|
||||
<span role="columnheader">流水号</span>
|
||||
<span role="columnheader">业务</span>
|
||||
<span role="columnheader">方向</span>
|
||||
<span class="align-right" role="columnheader">金额</span>
|
||||
<span role="columnheader">余额类型</span>
|
||||
<span class="align-right" role="columnheader">变化后余额</span>
|
||||
<span role="columnheader">备注</span>
|
||||
<span role="columnheader">时间</span>
|
||||
<button type="button" class="ledger-refresh" :disabled="loading" @click="loadWallet">
|
||||
<el-icon :class="{ 'is-spinning': loading }"><Refresh /></el-icon>
|
||||
刷新
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="ledger.length === 0" class="ledger-empty">暂无资金流水</div>
|
||||
<div v-else class="ledger-body">
|
||||
<div v-for="row in ledger" :key="row.id" class="ledger-grid ledger-row" role="row">
|
||||
<span class="ledger-cell ledger-no" :title="row.ledger_no">{{ row.ledger_no }}</span>
|
||||
<span class="ledger-cell">
|
||||
<el-tag effect="plain" class="biz-tag">{{ walletBizTypeLabel(row.biz_type) }}</el-tag>
|
||||
</span>
|
||||
<span class="ledger-cell">
|
||||
<el-tag :type="directionTone(row.direction)" effect="light" round>
|
||||
{{ ledgerDirectionLabel(row.direction) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
<span class="ledger-cell align-right amount-cell" :class="`is-${row.direction}`">
|
||||
{{ amountPrefix(row.direction) }}{{ formatCentWithSymbol(row.amount_cent) }}
|
||||
</span>
|
||||
<span class="ledger-cell muted-cell">{{ balanceTypeLabel(row.balance_type) }}</span>
|
||||
<span class="ledger-cell align-right">{{
|
||||
formatCentWithSymbol(row.balance_after_cent)
|
||||
}}</span>
|
||||
<span class="ledger-cell" :title="row.remark">{{ row.remark || '-' }}</span>
|
||||
<span class="ledger-cell">{{ formatDateTime(row.created_at) }}</span>
|
||||
|
||||
<div class="wallet-ledger-table" role="table" aria-label="资金流水">
|
||||
<div class="ledger-grid ledger-header" role="row">
|
||||
<span role="columnheader">流水号</span>
|
||||
<span role="columnheader">业务</span>
|
||||
<span role="columnheader">方向</span>
|
||||
<span class="align-right" role="columnheader">金额</span>
|
||||
<span role="columnheader">余额类型</span>
|
||||
<span class="align-right" role="columnheader">变化后余额</span>
|
||||
<span role="columnheader">备注</span>
|
||||
<span role="columnheader">时间</span>
|
||||
</div>
|
||||
<div v-if="ledger.length === 0" class="ledger-empty">暂无资金流水</div>
|
||||
<div v-else class="ledger-body">
|
||||
<div v-for="row in ledger" :key="row.id" class="ledger-grid ledger-row" role="row">
|
||||
<span class="ledger-cell ledger-no" :title="row.ledger_no">{{ row.ledger_no }}</span>
|
||||
<span class="ledger-cell">
|
||||
<span class="biz-chip">{{ walletBizTypeLabel(row.biz_type) }}</span>
|
||||
</span>
|
||||
<span class="ledger-cell">
|
||||
<span class="direction-chip" :class="`is-${row.direction}`">
|
||||
{{ ledgerDirectionLabel(row.direction) }}
|
||||
</span>
|
||||
</span>
|
||||
<span class="ledger-cell align-right amount-cell" :class="`is-${row.direction}`">
|
||||
{{ amountPrefix(row.direction) }}{{ formatCentWithSymbol(row.amount_cent) }}
|
||||
</span>
|
||||
<span class="ledger-cell muted-cell">{{ balanceTypeLabel(row.balance_type) }}</span>
|
||||
<span class="ledger-cell align-right">{{
|
||||
formatCentWithSymbol(row.balance_after_cent)
|
||||
}}</span>
|
||||
<span class="ledger-cell" :title="row.remark">{{ row.remark || '-' }}</span>
|
||||
<span class="ledger-cell">{{ formatDateTime(row.created_at) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="pagination-wrap" v-if="total > 0">
|
||||
<el-pagination
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="currentPageSize"
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@current-change="loadLedgerPage"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
</div>
|
||||
<div class="ledger-pagination" v-if="total > 0">
|
||||
<el-pagination
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="currentPageSize"
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@current-change="loadLedgerPage"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.wallet-page {
|
||||
display: grid;
|
||||
gap: 18px;
|
||||
gap: 20px;
|
||||
--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;
|
||||
--wallet-accent: #a95522;
|
||||
--wallet-ink: #252a31;
|
||||
--wallet-muted: #737980;
|
||||
--wallet-border: #e4e5e7;
|
||||
--wallet-soft: #f6f5f3;
|
||||
}
|
||||
|
||||
.wallet-hero {
|
||||
.wallet-header {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 24px;
|
||||
padding: 28px;
|
||||
border: 1px solid #e6eaf2;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(135deg, rgba(255, 122, 0, 0.08), rgba(15, 118, 110, 0.06)), #ffffff;
|
||||
box-shadow: 0 14px 36px rgba(17, 24, 39, 0.06);
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.wallet-hero :deep(.page-header) {
|
||||
max-width: 780px;
|
||||
.wallet-header :deep(.page-header) {
|
||||
max-width: 760px;
|
||||
}
|
||||
|
||||
.page-header .eyebrow {
|
||||
color: var(--wallet-accent);
|
||||
}
|
||||
|
||||
.distribution-site-tag {
|
||||
@@ -265,214 +275,271 @@ function amountPrefix(direction: string) {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.wallet-hero-action {
|
||||
min-width: 220px;
|
||||
padding: 16px 18px;
|
||||
border: 1px solid rgba(255, 122, 0, 0.18);
|
||||
.wallet-overview {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.5fr);
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--wallet-border);
|
||||
border-radius: 8px;
|
||||
background: rgba(255, 255, 255, 0.78);
|
||||
text-align: right;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 8px 24px rgba(25, 29, 34, 0.045);
|
||||
}
|
||||
|
||||
.wallet-hero-action span {
|
||||
display: block;
|
||||
color: #6b7280;
|
||||
.wallet-balance-block {
|
||||
min-width: 0;
|
||||
padding: 24px 26px;
|
||||
border-right: 1px solid var(--wallet-border);
|
||||
background: var(--wallet-soft);
|
||||
color: var(--wallet-ink);
|
||||
}
|
||||
|
||||
.balance-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
color: #686d73;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.wallet-hero-action strong {
|
||||
.balance-icon {
|
||||
display: grid;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
place-items: center;
|
||||
border: 1px solid #e0ddd9;
|
||||
border-radius: 7px;
|
||||
background: #ffffff;
|
||||
color: var(--wallet-accent);
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.wallet-balance-block strong {
|
||||
display: block;
|
||||
margin-top: 6px;
|
||||
color: #111a44;
|
||||
font-size: 28px;
|
||||
line-height: 1.15;
|
||||
margin-top: 18px;
|
||||
color: var(--wallet-ink);
|
||||
font-size: 38px;
|
||||
font-weight: 700;
|
||||
line-height: 1.12;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.wallet-balance-block p {
|
||||
max-width: 360px;
|
||||
margin: 10px 0 0;
|
||||
color: #77736f;
|
||||
font-size: 12px;
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.withdraw-button {
|
||||
width: 100%;
|
||||
margin-top: 14px;
|
||||
display: inline-flex;
|
||||
height: 34px;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
justify-content: center;
|
||||
min-width: 126px;
|
||||
margin-top: 20px;
|
||||
padding: 0 13px;
|
||||
border: 1px solid var(--wallet-accent);
|
||||
border-radius: 6px;
|
||||
background: var(--wallet-accent);
|
||||
color: #ffffff;
|
||||
font: inherit;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
border-color 0.15s,
|
||||
background 0.15s;
|
||||
}
|
||||
|
||||
.withdraw-tag {
|
||||
margin-left: 8px;
|
||||
vertical-align: middle;
|
||||
.withdraw-button:hover,
|
||||
.withdraw-button:focus {
|
||||
border-color: #8d461c;
|
||||
background: #8d461c;
|
||||
}
|
||||
|
||||
.withdraw-button:focus-visible {
|
||||
outline: 2px solid rgba(169, 85, 34, 0.28);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.wallet-metric-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 16px;
|
||||
align-items: stretch;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.wallet-metric-card {
|
||||
.wallet-metric-item {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
padding: 24px 20px;
|
||||
border-left: 1px solid #ececea;
|
||||
}
|
||||
|
||||
.metric-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
min-height: 120px;
|
||||
padding: 20px;
|
||||
border: 1px solid #e6eaf2;
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
|
||||
}
|
||||
|
||||
.metric-icon {
|
||||
display: grid;
|
||||
flex: 0 0 46px;
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
place-items: center;
|
||||
border-radius: 8px;
|
||||
color: #ffffff;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.wallet-metric-card.is-available .metric-icon {
|
||||
background: #ff6b00;
|
||||
}
|
||||
|
||||
.wallet-metric-card.is-frozen .metric-icon {
|
||||
background: #3b82f6;
|
||||
}
|
||||
|
||||
.wallet-metric-card.is-status .metric-icon {
|
||||
background: #0f766e;
|
||||
}
|
||||
|
||||
.wallet-metric-card.is-warning .metric-icon {
|
||||
background: #d97706;
|
||||
}
|
||||
|
||||
.wallet-metric-card span,
|
||||
.wallet-metric-card small {
|
||||
display: block;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.wallet-metric-card span {
|
||||
gap: 7px;
|
||||
color: #686e75;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.wallet-metric-card strong {
|
||||
.metric-label .el-icon {
|
||||
display: grid;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
place-items: center;
|
||||
border-radius: 6px;
|
||||
background: #f3f2f0;
|
||||
color: #746d67;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.wallet-metric-item.is-frozen .metric-label .el-icon {
|
||||
background: #f6f1e8;
|
||||
color: #93652f;
|
||||
}
|
||||
|
||||
.wallet-metric-item.is-status .metric-label .el-icon {
|
||||
background: #eef4ef;
|
||||
color: #557460;
|
||||
}
|
||||
|
||||
.wallet-metric-item.is-warning .metric-label .el-icon {
|
||||
background: #f8eeee;
|
||||
color: #9d5656;
|
||||
}
|
||||
|
||||
.wallet-metric-item.is-ledger .metric-label .el-icon {
|
||||
background: #f3f1ef;
|
||||
color: #6d625a;
|
||||
}
|
||||
|
||||
.wallet-metric-item.is-warning .metric-label {
|
||||
color: #8d6262;
|
||||
}
|
||||
|
||||
.wallet-metric-item strong {
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
color: #111a44;
|
||||
font-size: 26px;
|
||||
line-height: 1.1;
|
||||
margin-top: 12px;
|
||||
color: var(--wallet-ink);
|
||||
font-size: 20px;
|
||||
line-height: 1.25;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.wallet-metric-card small {
|
||||
margin-top: 8px;
|
||||
.wallet-metric-item small {
|
||||
display: block;
|
||||
margin-top: 7px;
|
||||
color: #898e94;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.wallet-workspace {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.ledger-summary-card {
|
||||
display: grid;
|
||||
gap: 18px;
|
||||
padding: 20px;
|
||||
border: 1px solid #e6eaf2;
|
||||
.wallet-ledger-panel {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--wallet-border);
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
|
||||
box-shadow: 0 6px 20px rgba(25, 29, 34, 0.04);
|
||||
}
|
||||
|
||||
.ledger-summary-card {
|
||||
align-content: space-between;
|
||||
}
|
||||
|
||||
.ledger-summary-card :deep(.el-button) {
|
||||
justify-self: start;
|
||||
min-width: 118px;
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
.ledger-toolbar {
|
||||
display: flex;
|
||||
min-height: 68px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 20px;
|
||||
padding: 14px 20px;
|
||||
border-bottom: 1px solid var(--wallet-border);
|
||||
}
|
||||
|
||||
.ledger-heading {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.panel-title-icon {
|
||||
.ledger-heading-icon {
|
||||
display: grid;
|
||||
flex: 0 0 40px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
flex: 0 0 38px;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
place-items: center;
|
||||
border-radius: 8px;
|
||||
background: #fff4ec;
|
||||
color: #ff6b00;
|
||||
font-size: 20px;
|
||||
border-radius: 7px;
|
||||
background: #f5f2ef;
|
||||
color: #8f6245;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.panel-title-icon.is-blue {
|
||||
background: #eff6ff;
|
||||
color: #2563eb;
|
||||
}
|
||||
|
||||
.panel-title h2 {
|
||||
.ledger-heading h2 {
|
||||
margin: 0;
|
||||
color: #111827;
|
||||
font-size: 17px;
|
||||
color: var(--wallet-ink);
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.panel-title p {
|
||||
margin: 5px 0 0;
|
||||
color: #64748b;
|
||||
font-size: 13px;
|
||||
.ledger-heading p {
|
||||
margin: 4px 0 0;
|
||||
color: #7c8188;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.wallet-ledger-table {
|
||||
overflow-x: auto;
|
||||
border: 1px solid #e6eaf2;
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
|
||||
}
|
||||
|
||||
.ledger-grid {
|
||||
display: grid;
|
||||
grid-template-columns:
|
||||
minmax(200px, 2fr)
|
||||
minmax(100px, 0.8fr)
|
||||
minmax(80px, 0.6fr)
|
||||
minmax(100px, 0.8fr)
|
||||
minmax(100px, 0.8fr)
|
||||
minmax(120px, 0.9fr)
|
||||
minmax(190px, 1.5fr)
|
||||
minmax(100px, 0.75fr)
|
||||
minmax(78px, 0.58fr)
|
||||
minmax(108px, 0.8fr)
|
||||
minmax(96px, 0.72fr)
|
||||
minmax(118px, 0.85fr)
|
||||
minmax(140px, 1.2fr)
|
||||
minmax(170px, 1.1fr);
|
||||
minmax(160px, 1.05fr);
|
||||
align-items: center;
|
||||
column-gap: clamp(10px, 1vw, 20px);
|
||||
column-gap: clamp(10px, 1vw, 18px);
|
||||
padding: 0 clamp(16px, 1.5vw, 24px);
|
||||
}
|
||||
|
||||
.ledger-header {
|
||||
min-height: 48px;
|
||||
border-bottom: 1px solid #e6eaf2;
|
||||
background: #f8fafc;
|
||||
color: #64748b;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
min-height: 44px;
|
||||
border-bottom: 1px solid var(--wallet-border);
|
||||
background: #fafafa;
|
||||
color: #72777e;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ledger-header span {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ledger-header span:first-child {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.ledger-header span.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.ledger-row {
|
||||
min-height: 54px;
|
||||
border-bottom: 1px solid #edf1f6;
|
||||
color: #334155;
|
||||
font-size: 14px;
|
||||
min-height: 52px;
|
||||
border-bottom: 1px solid #f0f0f1;
|
||||
color: #394047;
|
||||
font-size: 13px;
|
||||
transition: background 0.15s ease;
|
||||
}
|
||||
|
||||
@@ -481,7 +548,7 @@ function amountPrefix(direction: string) {
|
||||
}
|
||||
|
||||
.ledger-row:hover {
|
||||
background: #f8fafc;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.ledger-cell {
|
||||
@@ -497,11 +564,11 @@ function amountPrefix(direction: string) {
|
||||
}
|
||||
|
||||
.ledger-no {
|
||||
color: #475569;
|
||||
color: #686d73;
|
||||
font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.02em;
|
||||
text-align: center;
|
||||
letter-spacing: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
@@ -510,17 +577,58 @@ function amountPrefix(direction: string) {
|
||||
|
||||
.ledger-empty {
|
||||
display: grid;
|
||||
min-height: 80px;
|
||||
min-height: 140px;
|
||||
place-items: center;
|
||||
border-top: 1px solid #edf1f6;
|
||||
color: #94a3b8;
|
||||
color: #8c9096;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.biz-tag {
|
||||
max-width: 96px;
|
||||
height: 24px;
|
||||
line-height: 22px;
|
||||
.biz-chip {
|
||||
display: inline-flex;
|
||||
max-width: 100px;
|
||||
height: 22px;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
padding: 0 7px;
|
||||
border: 1px solid #e7e4e1;
|
||||
border-radius: 4px;
|
||||
background: #f8f7f6;
|
||||
color: #6f6258;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.direction-chip {
|
||||
display: inline-flex;
|
||||
height: 22px;
|
||||
align-items: center;
|
||||
padding: 0 7px;
|
||||
border: 1px solid #e0e5e1;
|
||||
border-radius: 999px;
|
||||
background: #f4f7f5;
|
||||
color: #53715c;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.direction-chip.is-out {
|
||||
border-color: #eadede;
|
||||
background: #faf3f3;
|
||||
color: #945858;
|
||||
}
|
||||
|
||||
.direction-chip.is-freeze {
|
||||
border-color: #e8e0d3;
|
||||
background: #f8f4ed;
|
||||
color: #85683e;
|
||||
}
|
||||
|
||||
.direction-chip.is-unfreeze {
|
||||
border-color: #e0e5e1;
|
||||
background: #f4f7f5;
|
||||
color: #53715c;
|
||||
}
|
||||
|
||||
.amount-cell {
|
||||
@@ -529,16 +637,84 @@ function amountPrefix(direction: string) {
|
||||
|
||||
.amount-cell.is-in,
|
||||
.amount-cell.is-unfreeze {
|
||||
color: #047857;
|
||||
color: #4f7358;
|
||||
}
|
||||
|
||||
.amount-cell.is-out,
|
||||
.amount-cell.is-freeze {
|
||||
color: #dc2626;
|
||||
color: #9a5555;
|
||||
}
|
||||
|
||||
.muted-cell {
|
||||
color: #64748b;
|
||||
color: #74797f;
|
||||
}
|
||||
|
||||
.ledger-pagination {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 14px 20px;
|
||||
border-top: 1px solid var(--wallet-border);
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.ledger-refresh {
|
||||
display: inline-flex;
|
||||
height: 30px;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #dedfe1;
|
||||
border-radius: 6px;
|
||||
background: #ffffff;
|
||||
color: #62676d;
|
||||
font: inherit;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
border-color 0.15s,
|
||||
background 0.15s,
|
||||
color 0.15s;
|
||||
}
|
||||
|
||||
.ledger-refresh:hover:not(:disabled) {
|
||||
border-color: #cbb7a8;
|
||||
background: #faf8f6;
|
||||
color: #7f4b2d;
|
||||
}
|
||||
|
||||
.ledger-refresh:focus-visible {
|
||||
outline: 2px solid rgba(169, 85, 34, 0.25);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
.ledger-refresh:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.is-spinning {
|
||||
animation: wallet-spin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes wallet-spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.ledger-pagination :deep(.el-pager li.is-active) {
|
||||
background: var(--wallet-accent);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.ledger-pagination :deep(.el-pager li:hover),
|
||||
.ledger-pagination :deep(.btn-prev:hover),
|
||||
.ledger-pagination :deep(.btn-next:hover) {
|
||||
color: var(--wallet-accent);
|
||||
}
|
||||
|
||||
.ledger-pagination :deep(.el-select__wrapper.is-focused) {
|
||||
box-shadow: 0 0 0 1px #d1a084 inset;
|
||||
}
|
||||
|
||||
.pay-dialog-body {
|
||||
@@ -620,24 +796,61 @@ function amountPrefix(direction: string) {
|
||||
z-index: 4001;
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.wallet-hero {
|
||||
display: grid;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.wallet-hero-action {
|
||||
min-width: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.wallet-metric-grid,
|
||||
.wallet-workspace {
|
||||
@media (max-width: 1100px) {
|
||||
.wallet-overview {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.wallet-metric-card {
|
||||
min-height: auto;
|
||||
.wallet-balance-block {
|
||||
border-right: 0;
|
||||
border-bottom: 1px solid var(--wallet-border);
|
||||
}
|
||||
|
||||
.wallet-metric-grid {
|
||||
border-top: 1px solid #edf1f6;
|
||||
}
|
||||
|
||||
.wallet-metric-item:first-child {
|
||||
border-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.wallet-header {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.wallet-balance-block {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.wallet-balance-block strong {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.wallet-metric-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.wallet-metric-item {
|
||||
padding: 16px 20px;
|
||||
border-top: 1px solid #edf1f6;
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
.wallet-metric-item:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.ledger-toolbar {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.ledger-pagination {
|
||||
justify-content: flex-start;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.pay-qr-panel {
|
||||
@@ -649,13 +862,13 @@ function amountPrefix(direction: string) {
|
||||
.ledger-grid {
|
||||
grid-template-columns:
|
||||
minmax(160px, 1.5fr)
|
||||
minmax(80px, 0.8fr)
|
||||
minmax(64px, 0.6fr)
|
||||
minmax(80px, 0.8fr)
|
||||
minmax(80px, 0.8fr)
|
||||
minmax(100px, 0.9fr)
|
||||
minmax(120px, 1fr)
|
||||
minmax(140px, 1fr);
|
||||
minmax(84px, 0.75fr)
|
||||
minmax(64px, 0.58fr)
|
||||
minmax(90px, 0.8fr)
|
||||
minmax(80px, 0.72fr)
|
||||
minmax(100px, 0.85fr)
|
||||
minmax(120px, 1.2fr)
|
||||
minmax(140px, 1.05fr);
|
||||
column-gap: 8px;
|
||||
padding: 0 12px;
|
||||
font-size: 13px;
|
||||
|
||||
Reference in New Issue
Block a user