feat: 接入 UserHome 前端业务代码(含真实 src/依赖,保留 projman 标准 CI)
deploy-userbase-front / build-and-deploy (push) Failing after 1m54s
build / build (push) Successful in 3m36s

This commit is contained in:
chenxing
2026-09-09 22:37:59 +08:00
parent a53ce07228
commit 4279f99be1
270 changed files with 12479 additions and 25715 deletions
+41
View File
@@ -0,0 +1,41 @@
import { IframePageParmas, LinkOpenTypeEnum, StateEnum } from "@/types";
import mittBus from "@/utils/mitt";
interface LinkPageOptions {
url: string;
type?: number | LinkOpenTypeEnum;
id?: number;
isTicket?: boolean;
title?: string;
isHeader?: boolean;
modalWidth?: number;
modalHeight?: number;
}
export function bschLinkPage(options: LinkPageOptions) {
const { url, type = LinkOpenTypeEnum.Open, title } = options;
const openType: LinkOpenTypeEnum = type as LinkOpenTypeEnum;
if (openType === LinkOpenTypeEnum.Open) {
window.open(url);
} else if (openType === LinkOpenTypeEnum.Href) {
window.location.href = url;
} else if (openType === LinkOpenTypeEnum.IFrame) {
const { isHeader = false } = options;
const params: IframePageParmas = {
url,
appName: title ?? "",
isHeader,
};
mittBus.emit("openBschIframePage", params);
} else if (openType === LinkOpenTypeEnum.Modal) {
const { modalWidth = 80, modalHeight = 70 } = options;
mittBus.emit("showLightAppModal", { width: modalWidth, height: modalHeight, url, title: title ?? "轻应用" });
// const { modalTitle = "新窗口", modalWidth = 80, modalHeight = 70 } = options;
}
}
export function isTickeRoterByName(name: string) {
return ["BschAppDetails", "AppDetails"].includes(name);
}