Files
Genarrative/src/services/frontendRuntimeConfigService.ts
T
kdletters 00ff425e03 改造充值订单过期补偿流程
新增 SpacetimeDB 原生充值订单过期 timer 与 expired 状态。

移除 api-server 轮询 worker,改为 HTTP 角色订阅 Pending 到 Expired 事件并查单补偿。

统一微信下单 5 分钟 time_expire,并恢复前端支付通道选择与 expired 展示。

补齐生成绑定、前后端契约、测试和项目文档。
2026-07-10 01:37:53 +08:00

23 lines
560 B
TypeScript

import { requestJson } from './apiClient';
const FRONTEND_RUNTIME_CONFIG_API = '/api/runtime/frontend-config';
export type FrontendRuntimeConfig = {
imageEditorAgentSidebarEnabled: boolean;
};
export async function loadFrontendRuntimeConfig() {
return requestJson<FrontendRuntimeConfig>(
FRONTEND_RUNTIME_CONFIG_API,
{ method: 'GET' },
'读取前端运行时配置失败',
{
authImpact: 'local',
skipAuth: true,
skipRefresh: true,
notifyAuthStateChange: false,
clearAuthOnUnauthorized: false,
},
);
}