Files
gongxue-base/apps/taro/src/index.html

59 lines
2.9 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,viewport-fit=cover">
<meta name="format-detection" content="telephone=no,address=no,email=no">
<meta name="renderer" content="webkit">
<meta name="referrer" content="strict-origin-when-cross-origin">
<meta name="apple-mobile-web-app-capable" content="yes">
<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 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
};
if (isRootEntry) {
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent('/'));
return;
}
if (portal === 'student' && path.indexOf('/pages/') === 0 && path.indexOf('/pages/student/') !== 0 && path.indexOf('/pages/bootstrap/') !== 0) {
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent('/pages/student/home/index'));
return;
}
if (portal === 'tenant-admin' && path.indexOf('/pages/') === 0 && path.indexOf('/pages/tenant-admin/') !== 0 && path.indexOf('/pages/bootstrap/') !== 0 && path.indexOf('/pages/student/login/') !== 0) {
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent('/pages/tenant-admin/workbench/index'));
return;
}
if (portal === 'platform-admin' && path.indexOf('/pages/') === 0 && path.indexOf('/pages/platform-admin/') !== 0 && path.indexOf('/pages/bootstrap/') !== 0 && path.indexOf('/pages/student/login/') !== 0) {
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent('/pages/platform-admin/workbench/index'));
return;
}
if (path.indexOf('/pages/student/') === 0 && !publicStudentPaths[path]) {
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent(redirect));
return;
}
if (portal === 'tenant-admin' && path.indexOf('/pages/tenant-admin/') === 0) {
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent(redirect));
return;
}
if (portal === 'platform-admin' && path.indexOf('/pages/platform-admin/') === 0) {
window.location.replace('/pages/bootstrap/index?redirect=' + encodeURIComponent(redirect));
}
}());
</script>
<script><%= htmlWebpackPlugin.options.script %></script>
</head>
<body>
<div id="app"></div>
</body>
</html>