sync(theme-2): 从 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;
|
||||
};
|
||||
@@ -198,7 +200,7 @@ const pullIndicatorStyle = () => ({
|
||||
<span class="tx-type">{{ txLabel(tx) }}</span>
|
||||
<span v-if="txSubtitle(tx)" class="tx-summary">{{ txSubtitle(tx) }}</span>
|
||||
</div>
|
||||
<span :class="parseFloat(tx.amount) >= 0 ? 'pos' : 'neg'">
|
||||
<span :class="txAmountClass(tx.amount)">
|
||||
{{ formatMoney(tx.amount, locale) }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -358,6 +360,7 @@ const pullIndicatorStyle = () => ({
|
||||
.tx-type { font-weight: 700; color: #1A1A2E; }
|
||||
.pos { color: #003D6B; font-weight: 800; font-size: 15px; }
|
||||
.neg { color: #DC2626; font-weight: 700; }
|
||||
.zero { color: #6B7280; font-weight: 700; font-size: 15px; }
|
||||
.tx-time { font-size: 11px; color: #6B7280; }
|
||||
.tx-arrow { font-size: 16px; color: #6B7280; font-weight: 700; 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 '';
|
||||
@@ -280,6 +277,11 @@ function goCashbackDetail() {
|
||||
background: linear-gradient(135deg, rgba(220, 38, 38, 0.04), #FFFFFF);
|
||||
}
|
||||
|
||||
.hero.zero {
|
||||
border-color: #E5E7EB;
|
||||
background: #F5F7FA;
|
||||
}
|
||||
|
||||
.hero-type {
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
@@ -304,6 +306,7 @@ function goCashbackDetail() {
|
||||
|
||||
.hero.pos .hero-amount { color: #003D6B; }
|
||||
.hero.neg .hero-amount { color: #DC2626; }
|
||||
.hero.zero .hero-amount { color: #6B7280; }
|
||||
|
||||
.hero-time {
|
||||
font-size: 11px;
|
||||
@@ -352,6 +355,7 @@ function goCashbackDetail() {
|
||||
|
||||
.pos { color: #003D6B !important; }
|
||||
.neg { color: #DC2626 !important; }
|
||||
.zero { color: #6B7280 !important; }
|
||||
|
||||
.mono {
|
||||
font-family: ui-monospace, monospace;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import api from '../api';
|
||||
import { formatMoney, formatMoneyCompact } from '../utils/localeDisplay';
|
||||
import { txTypeKey, txDisplayType, txSummaryLabel } from '../utils/walletTx';
|
||||
import { txTypeKey, txDisplayType, txAmountClass, txSummaryLabel } from '../utils/walletTx';
|
||||
import { parseCashbackApiData, sumCashbackAmount } from '../utils/cashback';
|
||||
import GoldSpinner from '../components/GoldSpinner.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;
|
||||
};
|
||||
@@ -121,7 +123,7 @@ const pullIndicatorStyle = () => ({
|
||||
<span class="tx-type">{{ txLabel(tx) }}</span>
|
||||
<span v-if="txSubtitle(tx)" class="tx-summary">{{ txSubtitle(tx) }}</span>
|
||||
</div>
|
||||
<span :class="parseFloat(tx.amount) >= 0 ? 'pos' : 'neg'">
|
||||
<span :class="txAmountClass(tx.amount)">
|
||||
{{ formatMoney(tx.amount, locale) }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -225,6 +227,7 @@ const pullIndicatorStyle = () => ({
|
||||
.tx-type { font-weight: 700; color: #1A1A2E; }
|
||||
.pos { color: #003D6B; font-weight: 800; font-size: 14px; }
|
||||
.neg { color: #DC2626; font-weight: 700; }
|
||||
.zero { color: #6B7280; font-weight: 700; font-size: 14px; }
|
||||
.tx-time { font-size: 11px; color: #6B7280; }
|
||||
.tx-arrow { font-size: 16px; color: #6B7280; font-weight: 700; line-height: 1; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user