Add baccarat loss cover activity
This commit is contained in:
@@ -127,6 +127,63 @@
|
||||
},
|
||||
btnLabel: (data) => data?.round?.status === 'betting' ? '🎲 立即下注' : '📊 查看详情',
|
||||
},
|
||||
{
|
||||
id: 'baccarat_loss_cover',
|
||||
name: '🎁 买单活动',
|
||||
desc: '查看“你玩游戏我买单”活动,补偿领取和个人历史记录',
|
||||
accentColor: '#16a34a',
|
||||
fetchUrl: '/baccarat-loss-cover/summary',
|
||||
openFn: () => {
|
||||
closeGameHall();
|
||||
if (typeof openBaccaratLossCoverModal === 'function') {
|
||||
openBaccaratLossCoverModal('overview');
|
||||
}
|
||||
},
|
||||
renderStatus: (data) => {
|
||||
const event = data?.event;
|
||||
if (!event) {
|
||||
return {
|
||||
badge: '📭 暂无活动',
|
||||
badgeStyle: 'background:#e8f0f8; color:#336699; border:1px solid #b8d0e8',
|
||||
detail: '当前没有进行中或待领取的买单活动'
|
||||
};
|
||||
}
|
||||
|
||||
const myStatus = event.my_record?.claim_status_label || '未参与';
|
||||
const total = Number(event.total_claimed_amount || 0).toLocaleString();
|
||||
|
||||
if (event.status === 'active') {
|
||||
return {
|
||||
badge: '🟢 进行中',
|
||||
badgeStyle: 'background:#d1fae5; color:#065f46; border:1px solid #6ee7b7',
|
||||
detail: `我的状态:${myStatus} | 开启人:${event.creator_username}`
|
||||
};
|
||||
}
|
||||
|
||||
if (event.status === 'settlement_pending') {
|
||||
return {
|
||||
badge: '⏳ 结算中',
|
||||
badgeStyle: 'background:#fef3c7; color:#92400e; border:1px solid #fcd34d',
|
||||
detail: `活动已结束,等待最后几局结算 | 我的状态:${myStatus}`
|
||||
};
|
||||
}
|
||||
|
||||
if (event.status === 'claimable') {
|
||||
return {
|
||||
badge: '💰 可领取',
|
||||
badgeStyle: 'background:#dcfce7; color:#166534; border:1px solid #86efac',
|
||||
detail: `我的状态:${myStatus} | 已发补偿 ${total} 金币`
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
badge: '🕒 即将开始',
|
||||
badgeStyle: 'background:#ede9fe; color:#5b21b6; border:1px solid #c4b5fd',
|
||||
detail: `开启人:${event.creator_username} | 我的状态:${myStatus}`
|
||||
};
|
||||
},
|
||||
btnLabel: (data) => data?.event?.status === 'claimable' ? '💰 查看并领取' : '📜 查看活动',
|
||||
},
|
||||
{
|
||||
id: 'slot_machine',
|
||||
name: '🎰 老虎机',
|
||||
|
||||
Reference in New Issue
Block a user