sync(theme-4): 从 main 同步优胜赛结算态与钱包流水展示优化
- checkout shared/api/admin 自 d3c2114
- player: outright 结算态逻辑、wallet txAmountClass、i18n 新增 key(保留海军蓝主题样式)
This commit is contained in:
@@ -4,7 +4,7 @@ import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import api from '../api';
|
||||
import { formatMoney } from '../utils/localeDisplay';
|
||||
import { isBetType, isDepositType, isWithdrawType, isCashbackType, txTypeKey, txDisplayType, txSummaryLabel } from '../utils/walletTx';
|
||||
import { isBetType, isDepositType, isWithdrawType, isCashbackType, txTypeKey, txDisplayType, txAmountClass, txSummaryLabel } from '../utils/walletTx';
|
||||
import GoldSpinner from '../components/GoldSpinner.vue';
|
||||
import WalletStatsPanel from '../components/WalletStatsPanel.vue';
|
||||
import { usePullToRefresh } from '../composables/usePullToRefresh';
|
||||
@@ -19,6 +19,8 @@ type Transaction = {
|
||||
summaryKind?: 'opening_bonus' | null;
|
||||
referenceType?: string | null;
|
||||
amount: string;
|
||||
frozenBefore?: string;
|
||||
frozenAfter?: string;
|
||||
createdAt: string;
|
||||
transactionId: string;
|
||||
};
|
||||
@@ -199,7 +201,7 @@ const pullIndicatorStyle = () => ({
|
||||
<span class="tx-time">{{ new Date(tx.createdAt).toLocaleString() }}</span>
|
||||
</div>
|
||||
<div class="tx-col-right">
|
||||
<span :class="parseFloat(tx.amount) >= 0 ? 'pos' : 'neg'">
|
||||
<span :class="txAmountClass(tx.amount)">
|
||||
{{ formatMoney(tx.amount, locale) }}
|
||||
</span>
|
||||
<span class="tx-arrow">›</span>
|
||||
@@ -362,6 +364,7 @@ const pullIndicatorStyle = () => ({
|
||||
.tx-type { font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
|
||||
.pos { color: var(--success); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
|
||||
.neg { color: var(--text); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
|
||||
.zero { color: var(--text-muted); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
|
||||
.tx-time { font-size: 11px; color: var(--text-dim); }
|
||||
.tx-arrow { font-size: 15px; color: var(--text-dim); font-weight: 400; line-height: 1; }
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useRoute, useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import api from '../api';
|
||||
import { formatMoney } from '../utils/localeDisplay';
|
||||
import { txTypeKey, isCashbackType, txDisplayType, txSummaryLabel, txRemarkLabel, isDepositReversalType } from '../utils/walletTx';
|
||||
import { txTypeKey, isCashbackType, txDisplayType, txAmountClass, txSummaryLabel, txRemarkLabel, isDepositReversalType } from '../utils/walletTx';
|
||||
import GoldSpinner from '../components/GoldSpinner.vue';
|
||||
import { usePullToRefresh } from '../composables/usePullToRefresh';
|
||||
|
||||
@@ -81,10 +81,7 @@ const summaryText = computed(() => {
|
||||
return txSummaryLabel(tx.value, t);
|
||||
});
|
||||
|
||||
const amountClass = computed(() => {
|
||||
if (!tx.value) return '';
|
||||
return parseFloat(tx.value.amount) >= 0 ? 'pos' : 'neg';
|
||||
});
|
||||
const amountClass = computed(() => (tx.value ? txAmountClass(tx.value.amount) : 'zero'));
|
||||
|
||||
const formattedTime = computed(() => {
|
||||
if (!tx.value) return '';
|
||||
@@ -279,6 +276,11 @@ function goCashbackDetail() {
|
||||
background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
|
||||
}
|
||||
|
||||
.hero.zero {
|
||||
border-color: var(--border);
|
||||
background: var(--bg-elevated);
|
||||
}
|
||||
|
||||
.hero-type {
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
@@ -303,6 +305,7 @@ function goCashbackDetail() {
|
||||
|
||||
.hero.pos .hero-amount { color: var(--success); }
|
||||
.hero.neg .hero-amount { color: var(--primary); }
|
||||
.hero.zero .hero-amount { color: var(--text-muted); }
|
||||
|
||||
.hero-time {
|
||||
font-size: 11px;
|
||||
@@ -350,6 +353,7 @@ function goCashbackDetail() {
|
||||
|
||||
.pos { color: var(--success) !important; }
|
||||
.neg { color: var(--primary) !important; }
|
||||
.zero { color: var(--text-muted) !important; }
|
||||
|
||||
.mono {
|
||||
font-family: ui-monospace, monospace;
|
||||
|
||||
@@ -10,7 +10,7 @@ import api from '../api';
|
||||
|
||||
import { formatMoney } from '../utils/localeDisplay';
|
||||
|
||||
import { txTypeKey, txDisplayType, txSummaryLabel } from '../utils/walletTx';
|
||||
import { txTypeKey, txDisplayType, txAmountClass, txSummaryLabel } from '../utils/walletTx';
|
||||
|
||||
import GoldSpinner from '../components/GoldSpinner.vue';
|
||||
|
||||
@@ -38,6 +38,10 @@ type Transaction = {
|
||||
|
||||
amount: string;
|
||||
|
||||
frozenBefore?: string;
|
||||
|
||||
frozenAfter?: string;
|
||||
|
||||
createdAt: string;
|
||||
|
||||
transactionId: string;
|
||||
@@ -236,7 +240,7 @@ const pullIndicatorStyle = () => ({
|
||||
|
||||
<div class="tx-col-right">
|
||||
|
||||
<span :class="parseFloat(tx.amount) >= 0 ? 'pos' : 'neg'">
|
||||
<span :class="txAmountClass(tx.amount)">
|
||||
|
||||
{{ formatMoney(tx.amount, locale) }}
|
||||
|
||||
@@ -530,6 +534,20 @@ const pullIndicatorStyle = () => ({
|
||||
|
||||
|
||||
|
||||
.zero {
|
||||
|
||||
color: var(--text-muted);
|
||||
|
||||
font-weight: 600;
|
||||
|
||||
font-size: 14px;
|
||||
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.tx-time {
|
||||
|
||||
font-size: 11px;
|
||||
|
||||
Reference in New Issue
Block a user