feat: 充值订单审计与重新申请,优化赛事展示和余额刷新
- 新增 deposit_order_audit_logs 表,记录提交/审批/拒绝/撤销/重提全链路 - 管理端充值单页增加审计历史;玩家端充值历史支持时间线与重新申请 - 已拒绝订单可原单号重提;撤销入账使用 PLAYER_DEPOSIT_REVERSAL 并加强幂等 - 结算后清除热门标记,允许归档已结算赛事,完善今日赛事时区窗口 - 足球页今日/早盘独立折叠;资料与余额在进入钱包/个人页及下注后自动刷新 - 补充投注玩法、结算返水规则文档;新增 smoke/settlement CLI 脚本 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -23,6 +23,7 @@ const profileRaw = ref<ProfileData | null>(null);
|
||||
const loading = ref(false);
|
||||
let loadPromise: Promise<void> | null = null;
|
||||
let assigningDefault = false;
|
||||
let visibilityBound = false;
|
||||
|
||||
function profileSeed(profile: ProfileData | null): string {
|
||||
if (!profile) return '';
|
||||
@@ -111,6 +112,20 @@ async function loadProfile(force = false) {
|
||||
return loadPromise;
|
||||
}
|
||||
|
||||
function refreshProfile() {
|
||||
return loadProfile(true);
|
||||
}
|
||||
|
||||
function bindProfileVisibilityRefresh() {
|
||||
if (visibilityBound || typeof document === 'undefined') return;
|
||||
visibilityBound = true;
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (document.visibilityState === 'visible' && profileRaw.value) {
|
||||
void loadProfile(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const avatarKey = computed(() => {
|
||||
const saved = profileRaw.value?.preferences?.avatarKey;
|
||||
if (saved && isValidAvatarKey(saved)) return saved;
|
||||
@@ -138,6 +153,8 @@ export function usePlayerProfile() {
|
||||
avatarKey,
|
||||
avatarUrl,
|
||||
loadProfile,
|
||||
refreshProfile,
|
||||
bindProfileVisibilityRefresh,
|
||||
setAvatarKey,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user