fix: 收口依赖兼容与会话撤销
为 miniprogram-ci 和 Jimp 依赖增加兼容 patch 与 smoke test;修复平台模板管理员路由漏配;收紧模板契约校验;为 admin/customer 增加 token 撤销和集中会话存储;同步品牌切换角色、doctor source hash、多屏宽截图证据和 CI 构建门禁。
This commit is contained in:
1 parent
4f0b50c7f1
commit
3017e3eb49
65 files changed
+1623
-975
No files matched your search
@@ -12,6 +12,7 @@ import {
|
||||
} from "@ant-design/icons";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import { createApiClient } from "../lib/api.js";
|
||||
import { saveAdminSession } from "../lib/auth-storage.js";
|
||||
import { BrandMark } from "../components/BrandMark.js";
|
||||
import { StatusTag } from "../components/StatusTag.js";
|
||||
import {
|
||||
@@ -43,7 +44,7 @@ export function Dashboard({
|
||||
}: {
|
||||
onLogout: () => void;
|
||||
role: string;
|
||||
platformTemplateRole: string;
|
||||
platformTemplateRole: "none" | "template_admin";
|
||||
}) {
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
@@ -58,7 +59,12 @@ export function Dashboard({
|
||||
const switchBrand = async (brandId: string) => {
|
||||
try {
|
||||
const result = await createApiClient().switchAdminBrand(brandId);
|
||||
localStorage.setItem("adminToken", result.token);
|
||||
saveAdminSession({
|
||||
token: result.token,
|
||||
role: result.role,
|
||||
platformTemplateRole,
|
||||
mustChangePassword: false,
|
||||
});
|
||||
window.location.reload();
|
||||
} catch (error) {
|
||||
message.error(error instanceof Error ? error.message : "品牌切换失败");
|
||||
|
||||
Reference in new issue
Block a user