From 09c80575b7979dee8dd51cd67b5a8b45b89cd13c Mon Sep 17 00:00:00 2001
From: zhangshy <994452054@qq.com>
Date: Sun, 13 Sep 2026 21:08:57 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BB=B6=E9=95=BF=E9=A3=8E=E6=8E=A7=E6=89=8B?=
=?UTF-8?q?=E5=8A=A8=E6=89=AB=E6=8F=8F=E5=89=8D=E7=AB=AF=E8=B6=85=E6=97=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/static/portal/common/api-client.js | 7 +++++--
app/static/portal/employee-risk/dashboard/dashboard.js | 2 +-
app/static/portal/employee-risk/dashboard/index.html | 2 +-
docs/风控业务演示文档/23-风控模块接口文档.md | 1 +
tests/unit/api/test_portal_frontend.py | 9 +++++++++
5 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/app/static/portal/common/api-client.js b/app/static/portal/common/api-client.js
index 48d1bd3..ea8b9c6 100644
--- a/app/static/portal/common/api-client.js
+++ b/app/static/portal/common/api-client.js
@@ -27,7 +27,7 @@ const ENDPOINTS = Object.freeze({
RK003: { method: 'GET', path: '/api/v1/risk/alerts/{alertNo}' },
RK004: { method: 'GET', path: '/api/v1/risk/evidence/{source}' },
RK005: { method: 'GET', path: '/api/v1/risk/notifications' },
- RK006: { method: 'POST', path: '/api/v1/risk/alerts/scan', idempotent: true },
+ RK006: { method: 'POST', path: '/api/v1/risk/alerts/scan', idempotent: true, timeout: 60000 },
RK007: { method: 'POST', path: '/api/v1/risk/alerts/{alertNo}/acknowledgements', idempotent: true },
RK008: { method: 'POST', path: '/api/v1/risk/alerts/{alertNo}/investigations', idempotent: true },
RK009: { method: 'POST', path: '/api/v1/risk/alerts/{alertNo}/exclusions', idempotent: true },
@@ -96,7 +96,10 @@ async function request(endpointId, options = {}) {
const controller = new AbortController();
const abortListener = () => controller.abort();
options.signal?.addEventListener('abort', abortListener, { once: true });
- const timeoutId = window.setTimeout(() => controller.abort(), options.timeout || 8000);
+ const timeoutId = window.setTimeout(
+ () => controller.abort(),
+ options.timeout || endpoint.timeout || 8000,
+ );
try {
const response = await fetch(`${pathFor(endpoint, options.pathParams)}${queryString}`, {
method: endpoint.method,
diff --git a/app/static/portal/employee-risk/dashboard/dashboard.js b/app/static/portal/employee-risk/dashboard/dashboard.js
index 53c460f..2be8a17 100644
--- a/app/static/portal/employee-risk/dashboard/dashboard.js
+++ b/app/static/portal/employee-risk/dashboard/dashboard.js
@@ -1,4 +1,4 @@
-import { apiClient } from '/static/portal/common/api-client.js?v=20260913';
+import { apiClient } from '/static/portal/common/api-client.js?v=20260913-2';
import { getAuthContext, getPermissions, requireRiskStaff, updateAuthPermissions } from '/static/portal/common/auth.js';
import { escapeHtml, formatDateTime } from '/static/portal/common/formatters.js';
import { mountShell } from '/static/portal/common/layout/app-shell.js';
diff --git a/app/static/portal/employee-risk/dashboard/index.html b/app/static/portal/employee-risk/dashboard/index.html
index 289bf91..b82d592 100644
--- a/app/static/portal/employee-risk/dashboard/index.html
+++ b/app/static/portal/employee-risk/dashboard/index.html
@@ -109,6 +109,6 @@
-
+