fix: guard H5 direct routes and refine legacy UI

This commit is contained in:
Codex
2026-07-02 02:31:49 +08:00
parent 60b1cb227c
commit 22a87f541a
7 changed files with 371 additions and 19 deletions

View File

@@ -11,6 +11,21 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="theme-color" content="#0f172a">
<title>工学题库</title>
<script>
(function () {
var path = window.location.pathname || '';
var publicStudentPaths = {
'/pages/student/login/index': true,
'/pages/student/region/index': true,
'/pages/student/catalog/index': true,
'/pages/student/scoreline/index': true
};
if (path.indexOf('/pages/student/') === 0 && !publicStudentPaths[path]) {
var redirect = path + (window.location.search || '');
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent(redirect));
}
}());
</script>
<script><%= htmlWebpackPlugin.options.script %></script>
</head>
<body>