fix: 收口依赖兼容与会话撤销

为 miniprogram-ci 和 Jimp 依赖增加兼容 patch 与 smoke test;修复平台模板管理员路由漏配;收紧模板契约校验;为 admin/customer 增加 token 撤销和集中会话存储;同步品牌切换角色、doctor source hash、多屏宽截图证据和 CI 构建门禁。
This commit is contained in:
que01 committed 2026-10-18 23:43:25 +08:00
1 parent 4f0b50c7f1
commit 3017e3eb49
65 files changed
+1623 -975

No files matched your search

+4 -5
View File
@@ -1,7 +1,8 @@
import { CloudUploadOutlined, DeleteOutlined, PictureOutlined } from "@ant-design/icons";
import { Alert, Button, Image, Popconfirm, Spin, Upload, message } from "antd";
import { useEffect, useMemo, useState } from "react";
import { apiBaseUrl, createApiClient } from "../lib/api.js";
import { apiBaseUrl, authenticatedFetch, createApiClient } from "../lib/api.js";
import { readAdminToken } from "../lib/auth-storage.js";
interface ImageUrlFieldProps {
id?: string;
@@ -54,13 +55,11 @@ export function ImageUrlField({ id, value, onChange, placeholder, scope }: Image
const uploadUrl = isLocalUpload
? `${apiBaseUrl.replace(/\/$/, "")}${presign.uploadUrl}`
: presign.uploadUrl;
const response = await fetch(uploadUrl, {
const response = await authenticatedFetch(uploadUrl, {
method: "PUT",
headers: {
"content-type": file.type,
...(isLocalUpload
? { authorization: `Bearer ${localStorage.getItem("adminToken") ?? ""}` }
: {}),
...(isLocalUpload ? { authorization: `Bearer ${readAdminToken() ?? ""}` } : {}),
},
body: file,
});