feat: 追溯码客户端预览(TOTP式令牌保护,不激活不计数,可切换激活状态预览)

This commit is contained in:
Nixevol
2026-07-12 23:16:37 +08:00
parent 8fd417aa87
commit c1d8fb9ca4
17 changed files with 696 additions and 191 deletions
+5
View File
@@ -24,6 +24,11 @@ export function fetchTrace(shortCode: string): Promise<any> {
return instance.get(`/public/trace/${shortCode}`) as unknown as Promise<any>;
}
// 后台预览:凭时间令牌访问,零副作用(不激活/不计数/不写日志);state 控制未激活/已激活形态
export function fetchTracePreview(shortCode: string, token: string, state: 'inactive' | 'active'): Promise<any> {
return instance.get(`/public/trace/${shortCode}/preview`, { params: { token, state } }) as unknown as Promise<any>;
}
export function fetchAppInfo(): Promise<any> {
return instance.get('/settings/public') as unknown as Promise<any>;
}