修复:优化二维码风控登录与批量发布兼容性

- 优化二维码登录风控提示,支持人脸验证二维码和验证截图。

- 修复批量发布发货地持久化,并兼容旧任务地址格式。

- 加强二维码登录和通知渠道的敏感数据保护。

- 补充登录风控使用说明。
This commit is contained in:
Christ committed 2026-08-19 22:50:03 +08:00
1 parent c1282dfa4e
commit c3020bde09
33 files changed
+855 -99

No files matched your search

+3 -10
View File
@@ -39,18 +39,11 @@ const stringifyNotificationEventTypes = (eventTypes?: NotificationEventType[]):
/** 把后端渠道 DTO 转换为通知编辑器使用的 UI 模型。 */
const toNotificationChannel = (channel: NotificationChannelResponse): NotificationChannel => {
// config 是解析失败时降级为空对象的渠道配置。
let config: Record<string, unknown> = {};
try {
// parsed 是配置文本解析后的未知 JSON 值。
const parsed: unknown = typeof channel.config === 'string' ? JSON.parse(channel.config) : channel.config;
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) config = parsed as Record<string, unknown>;
} catch {
// 历史损坏配置不阻止用户继续编辑渠道。
}
// config 是列表摘要不返回 SMTP 等秘密时使用的空编辑初始值。
const config: Record<string, unknown> = {};
// type 是处理 ding_talk/lark 历史别名后的渠道类型。
const type = (channel.type === 'ding_talk' ? 'dingtalk' : channel.type === 'lark' ? 'feishu' : channel.type) as NotificationChannel['type'];
return { id: String(channel.id), name: channel.name, type, config, event_types: parseNotificationEventTypes(channel.event_types), enabled: channel.enabled, created_at: channel.created_at, updated_at: channel.updated_at };
return { id: String(channel.id), name: channel.name, type, config, event_types: parseNotificationEventTypes(channel.event_types), enabled: channel.enabled };
};
/** 获取全部通知渠道并转换为编辑器模型。 */