style: tighten H5 guards and legacy student UI

This commit is contained in:
Codex
2026-07-02 02:57:43 +08:00
parent 0c27280f42
commit c74347a7a0
14 changed files with 567 additions and 85 deletions

View File

@@ -16,12 +16,15 @@
var path = window.location.pathname || '';
var portal = '<%= process.env.TARO_APP_PORTAL || "student" %>';
var redirect = path + (window.location.search || '');
var isRootEntry = !path || path === '/' || /\/index\.html$/.test(path);
var publicStudentPaths = {
'/pages/student/login/index': true,
'/pages/student/region/index': true,
'/pages/student/catalog/index': true,
'/pages/student/scoreline/index': true
'/pages/student/region/index': true
};
if (isRootEntry) {
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent('/'));
return;
}
if (path.indexOf('/pages/student/') === 0 && !publicStudentPaths[path]) {
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent(redirect));
return;