forked from wangziqi/gongxue-base
fix: guard H5 direct routes and refine legacy UI
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user