feat(W4): 站点path全链路-portalUrlOf/previewPortalUrl纯函数,站点列/向导地址预览/预览frame sitePath,store携带path,mock嵌套路由,T-W4-16..18 绿51/51
This commit is contained in:
@@ -214,9 +214,10 @@ class ThemeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/** 主题预览 iframe URL(方案 §5.5:/api/theme/preview,CAS 会话同源,参数 p_ 前缀) */
|
||||
export function themePreviewUrl(siteCode: string, theme: string, themeParams: Record<string, string> = {}): string {
|
||||
const params = new URLSearchParams({ siteCode, theme, page: "home" });
|
||||
/** 主题预览 iframe URL(方案 §5.5:/api/theme/preview,CAS 会话同源,参数 p_ 前缀)。
|
||||
* W4:内容源站点参数 sitePath(嵌套路径语义,后端 siteSnapshotByPath 解析)。 */
|
||||
export function themePreviewUrl(sitePath: string, theme: string, themeParams: Record<string, string> = {}): string {
|
||||
const params = new URLSearchParams({ sitePath, theme, page: "home" });
|
||||
Object.keys(themeParams).forEach(k => params.set(`p_${k}`, themeParams[k]));
|
||||
return `${conf.isMock ? "" : conf.serviceHost}/api/theme/preview?${params.toString()}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user