优化游戏 金币显示

This commit is contained in:
2026-04-12 17:46:24 +08:00
parent e7aea014fb
commit 28cbf2b564
3 changed files with 28 additions and 2 deletions

View File

@@ -11,10 +11,16 @@
style="width:720px; max-width:96vw; max-height:88vh; border-radius:8px; overflow:hidden; box-shadow:0 8px 32px rgba(0,0,0,.3); background:#fff; display:flex; flex-direction:column;">
<div
style="background:linear-gradient(135deg,#15803d,#22c55e); color:#fff; padding:12px 16px; display:flex; align-items:center; justify-content:space-between;">
<div>
<div style="flex: 1;">
<div style="font-size:15px; font-weight:bold;">🎁 你玩游戏我买单</div>
<div style="font-size:11px; color:rgba(255,255,255,.82); margin-top:2px;">查看活动历史、个人记录与补偿领取状态</div>
</div>
{{-- 金币余额 --}}
<div
style="font-size:12px; color:#dcfce7; display:flex; align-items:center; gap:3px; margin-right: 12px;
background:rgba(0,0,0,.2); padding:2px 8px; border-radius:10px;">
💰 <strong id="blc-modal-jjb" style="color:#ffe082; font-size:13px;">--</strong> 金币
</div>
<span onclick="closeBaccaratLossCoverModal()"
style="cursor:pointer; font-size:18px; opacity:.85;">&times;</span>
</div>
@@ -87,6 +93,10 @@
if (hallGold) {
hallGold.textContent = Number(window.chatContext.userJjb || 0).toLocaleString();
}
const modalGold = document.getElementById('blc-modal-jjb');
if (modalGold) {
modalGold.textContent = Number(window.chatContext.userJjb || 0).toLocaleString();
}
}
function renderCurrentEvent(event) {
@@ -241,6 +251,10 @@
window.openBaccaratLossCoverModal = async function(tab = 'overview') {
document.getElementById('baccarat-loss-cover-modal').style.display = 'flex';
const modalGold = document.getElementById('blc-modal-jjb');
if (modalGold) {
modalGold.textContent = Number(window.chatContext?.userJjb || 0).toLocaleString();
}
window.switchBaccaratLossCoverTab(tab);
await Promise.all([loadSummary(), loadHistory()]);
};

View File

@@ -24,13 +24,19 @@
<div
style="background:linear-gradient(135deg,#336699,#5a8fc0); padding:10px 16px;
display:flex; align-items:center; justify-content:space-between;">
<div>
<div style="flex: 1;">
<div style="color:#fff; font-weight:bold; font-size:14px;">🎲 百家乐</div>
<div style="color:rgba(255,255,255,.75); font-size:11px; margin-top:1px;">
<span x-show="roundId"> <span x-text="'#' + roundId"></span> </span>
<span x-show="!roundId" style="display:none;">等待开局中</span>
</div>
</div>
{{-- 金币余额 --}}
<div
style="font-size:12px; color:#d0e8ff; display:flex; align-items:center; gap:3px; margin-right: 12px;
background:rgba(0,0,0,.2); padding:2px 8px; border-radius:10px;">
💰 <strong style="color:#ffe082; font-size:13px;" x-text="Number(window.chatContext?.userJjb || 0).toLocaleString()">--</strong> 金币
</div>
{{-- 倒计时 --}}
<div x-show="phase === 'betting'" style="text-align:center;">
<div style="color:#fbbf24; font-size:28px; font-weight:900; line-height:1;" x-text="countdown">

View File

@@ -30,6 +30,12 @@
<span style="font-size:11px; font-weight:normal; color:rgba(255,255,255,.6); margin-left:4px;"
x-text="raceId ? '#' + raceId + ' 场' : ''"></span>
</div>
{{-- 金币余额 --}}
<div
style="font-size:12px; color:#d0e8ff; display:flex; align-items:center; gap:3px;
background:rgba(0,0,0,.2); padding:2px 8px; border-radius:10px;">
💰 <strong style="color:#ffe082; font-size:13px;" x-text="Number(window.chatContext?.userJjb || 0).toLocaleString()">--</strong> 金币
</div>
{{-- 倒计时(押注阶段) --}}
<div x-show="phase === 'betting'"
style="font-size:12px; color:#fff; background:rgba(255,255,255,.2); padding:4px 12px; border-radius:20px; border:1px solid rgba(255,255,255,.3); box-shadow:0 2px 4px rgba(0,0,0,.1) inset; display:flex; align-items:center; gap:4px;">