feat(theme-4): sync inbox/announcements/presence/deposit from main
This commit is contained in:
@@ -9,6 +9,17 @@ export const AGENT_MAX_LEVEL = 'agent.max_level';
|
||||
export const AGENT_DEFAULT_SUB_CREDIT_RATIO = 'agent.default_sub_credit_ratio';
|
||||
export const CASHBACK_PLATFORM_DIRECT_RATE = 'cashback.platform_direct_rate';
|
||||
export const CASHBACK_ADMIN_INVITE_RATE = 'cashback.admin_invite_rate';
|
||||
export const INBOX_NOTIFY_DEPOSIT = 'inbox.notify.deposit';
|
||||
export const INBOX_FEATURE_ENABLED = 'inbox.feature_enabled';
|
||||
export const INBOX_NOTIFY_BANNER = 'inbox.notify.banner';
|
||||
export const INBOX_NOTIFY_ANNOUNCEMENT = 'inbox.notify.announcement';
|
||||
|
||||
export type InboxNotifySettings = {
|
||||
/** 玩家端是否展示站内邮箱(关闭后入口直达客服) */
|
||||
inboxEnabled: boolean;
|
||||
/** 充值审核通过/拒绝时发送站内信 */
|
||||
deposit: boolean;
|
||||
};
|
||||
|
||||
export type PlatformDirectCashbackSettings = {
|
||||
/** 平台直属玩家默认返水比例(小数,0.01 = 1%) */
|
||||
@@ -222,4 +233,34 @@ export class SystemConfigService {
|
||||
}
|
||||
return this.getPlatformDirectCashbackSettings();
|
||||
}
|
||||
|
||||
async getInboxFeatureEnabled(): Promise<boolean> {
|
||||
return this.getBoolean(INBOX_FEATURE_ENABLED, true);
|
||||
}
|
||||
|
||||
async getInboxNotifySettings(): Promise<InboxNotifySettings> {
|
||||
const [inboxEnabled, deposit] = await Promise.all([
|
||||
this.getBoolean(INBOX_FEATURE_ENABLED, true),
|
||||
this.getBoolean(INBOX_NOTIFY_DEPOSIT, true),
|
||||
]);
|
||||
return { inboxEnabled, deposit };
|
||||
}
|
||||
|
||||
async updateInboxNotifySettings(data: Partial<InboxNotifySettings>) {
|
||||
if (data.inboxEnabled !== undefined) {
|
||||
await this.setBoolean(
|
||||
INBOX_FEATURE_ENABLED,
|
||||
data.inboxEnabled,
|
||||
'玩家端是否开启站内邮箱功能',
|
||||
);
|
||||
}
|
||||
if (data.deposit !== undefined) {
|
||||
await this.setBoolean(
|
||||
INBOX_NOTIFY_DEPOSIT,
|
||||
data.deposit,
|
||||
'充值审核结果是否通过站内邮箱通知玩家',
|
||||
);
|
||||
}
|
||||
return this.getInboxNotifySettings();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user