From c6e896efc306ae7d046273dfc94272f6d90a73e4 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 10 Feb 2026 18:06:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MarketCard.vue | 20 +++++++++++--------- src/components/OrderBook.vue | 19 ++++++++++--------- src/components/TradeComponent.vue | 14 +++++++------- src/router/index.ts | 2 +- src/views/TradeDetail.vue | 8 ++++---- 5 files changed, 33 insertions(+), 30 deletions(-) diff --git a/src/components/MarketCard.vue b/src/components/MarketCard.vue index f97b071..6399592 100644 --- a/src/components/MarketCard.vue +++ b/src/components/MarketCard.vue @@ -47,7 +47,7 @@
{ // 进度条纯色:0% 红 → 50% 图片橙黄 #FFBB5C → 100% 绿(两段 RGB 插值) const COLOR_RED = { r: 239, g: 68, b: 68 } const COLOR_ORANGE_YELLOW = { r: 255, g: 187, b: 92 } -const COLOR_GREEN = { r: 34, g: 197, b: 94 } +const COLOR_GREEN = { r: 22, g: 163, b: 74 } function rgbToHex(r: number, g: number, b: number): string { const toByte = (v: number) => Math.min(255, Math.max(0, Math.round(v))) return `#${toByte(r).toString(16).padStart(2, '0')}${toByte(g).toString(16).padStart(2, '0')}${toByte(b).toString(16).padStart(2, '0')}` @@ -423,7 +423,8 @@ function openTradeMulti(side: 'yes' | 'no', outcome: EventCardOutcome) { .option-yes { flex: 1; - background-color: #e6f9e6; + background-color: #b8e0b8; + border-radius: 6px; height: 40px; } @@ -431,12 +432,13 @@ function openTradeMulti(side: 'yes' | 'no', outcome: EventCardOutcome) { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 500; - color: #008000; + color: #006600; } .option-no { flex: 1; - background-color: #ffe6e6; + background-color: #f0b8b8; + border-radius: 6px; height: 40px; } @@ -444,7 +446,7 @@ function openTradeMulti(side: 'yes' | 'no', outcome: EventCardOutcome) { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 500; - color: #ff0000; + color: #cc0000; } /* Bottom Section:禁止被挤压,避免与 multi-section 重叠 */ diff --git a/src/components/OrderBook.vue b/src/components/OrderBook.vue index 1a0c259..92fdd95 100644 --- a/src/components/OrderBook.vue +++ b/src/components/OrderBook.vue @@ -28,13 +28,13 @@
TOTAL
-
Asks
+
@@ -43,6 +43,7 @@
{{ ask.cumulativeTotal.toFixed(2) }}
+
Asks
Bids
@@ -311,11 +312,11 @@ const maxBidsTotal = computed(() => { } .asks-bar { - background-color: #ffb3ba; + background-color: #e89595; } .bids-bar { - background-color: #b3ffb3; + background-color: #7acc7a; } .order-list { @@ -379,12 +380,12 @@ const maxBidsTotal = computed(() => { .asks-label { color: #ffffff; - background-color: #ff0000; + background-color: #cc0000; } .bids-label { color: #ffffff; - background-color: #008000; + background-color: #006600; } .order-item { @@ -402,11 +403,11 @@ const maxBidsTotal = computed(() => { } .asks-price { - color: #ff0000; + color: #cc0000; } .bids-price { - color: #008000; + color: #006600; } .order-price { diff --git a/src/components/TradeComponent.vue b/src/components/TradeComponent.vue index 0725e26..2925ce4 100644 --- a/src/components/TradeComponent.vue +++ b/src/components/TradeComponent.vue @@ -806,8 +806,8 @@ function submitOrder() { } .yes-btn.active { - background-color: #e6f9e6; - color: #008000; + background-color: #b8e0b8; + color: #006600; } .no-btn { @@ -820,7 +820,7 @@ function submitOrder() { } .no-btn.active { - background-color: #ff0000; + background-color: #cc0000; color: #ffffff; } @@ -960,7 +960,7 @@ function submitOrder() { align-items: center; gap: 4px; font-size: 12px; - color: #4caf50; + color: #3d8b40; } .expiration-header { @@ -1003,7 +1003,7 @@ function submitOrder() { .to-win-value { font-size: 15px; font-weight: 500; - color: #4caf50; + color: #3d8b40; } .action-btn { @@ -1103,7 +1103,7 @@ function submitOrder() { .mobile-bar-yes { flex: 1; min-width: 0; - background: #22c55e; + background: #16a34a; color: #fff; padding: 14px 16px; } @@ -1111,7 +1111,7 @@ function submitOrder() { .mobile-bar-no { flex: 1; min-width: 0; - background: #ef4444; + background: #dc2626; color: #fff; padding: 14px 16px; } diff --git a/src/router/index.ts b/src/router/index.ts index 70d4fa9..306e7dd 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -35,7 +35,7 @@ const router = createRouter({ } ], scrollBehavior(to, from, savedPosition) { - if (savedPosition) return savedPosition + if (savedPosition && from?.name) return savedPosition if (to.hash) return { el: to.hash } return { top: 0 } }, diff --git a/src/views/TradeDetail.vue b/src/views/TradeDetail.vue index a8bcdfa..4b3c82a 100644 --- a/src/views/TradeDetail.vue +++ b/src/views/TradeDetail.vue @@ -604,7 +604,7 @@ onUnmounted(() => { .option-yes { flex: 1; - background-color: #e6f9e6; + background-color: #b8e0b8; height: 56px; font-size: 18px; } @@ -612,12 +612,12 @@ onUnmounted(() => { .option-text-yes { font-size: 18px; font-weight: 600; - color: #008000; + color: #006600; } .option-no { flex: 1; - background-color: #ffe6e6; + background-color: #f0b8b8; height: 56px; font-size: 18px; } @@ -625,7 +625,7 @@ onUnmounted(() => { .option-text-no { font-size: 18px; font-weight: 600; - color: #ff0000; + color: #cc0000; } .market-info-section {