R1 先行批:问卷前端(Notice 模板移植 8 页面,tsc/vite build 通过)+ 菜单契约说明
build / build (push) Successful in 1m50s

This commit is contained in:
chenxing
2026-10-22 10:14:39 +08:00
parent 14269d0dae
commit 2d110498cd
81 changed files with 13248 additions and 2 deletions
+47
View File
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- 运行时配置引导(Notice 同款):部署态同步拉 /<contextPath>/api/env-config;
本地开发(根路径,段数不足 2)不设置,走 .env.dev -->
<script>
(function () {
try {
var seg = location.pathname.split("/").filter(Boolean);
if (seg.length < 2) return;
var xhr = new XMLHttpRequest();
xhr.open("GET", "/" + seg[0] + "/api/env-config?target=" + encodeURIComponent(seg[1]), false);
xhr.send(null);
if (xhr.status === 200) {
var conf = JSON.parse(xhr.responseText);
if (conf && typeof conf === "object") window.__APP_CONFIG__ = conf;
}
} catch (e) {
/* 拉取失败保持未设置,走同域推导兜底 */
}
})();
</script>
<!-- 主题通道引导(A 类免插件接入,Notice 同款):origin 零写死,四档优先级;
挂载/FOUC/CSS 排序全部由通道 init 脚本承担 -->
<script>
(function () {
var c = window.__APP_CONFIG__ || {};
var themeHost = "%VITE_THEME_HOST%";
if (themeHost.charAt(0) === "%") themeHost = "";
var host = String(c.staticHost || c.baseHost || themeHost).replace(/\/+$/, "");
document.write('<script src="' + host + '/static/js/yh-theme-init.js"><\/script>');
})();
</script>
<title><%- title %></title>
<%- injectScript %>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>