Files
gongxue-base/apps/taro/src/index.html
2026-07-03 23:51:09 +08:00

49 lines
2.1 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="mobile-web-app-capable" content="yes">
<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 isRootEntry = !path || path === '/' || /\/index\.html$/.test(path);
var landing = portal === 'tenant-admin'
? '/pages/tenant-admin/workbench/index'
: portal === 'platform-admin'
? '/pages/platform-admin/workbench/index'
: '/pages/student/home/index';
if (isRootEntry) {
window.location.replace(landing);
return;
}
if (portal === 'student' && path.indexOf('/pages/') === 0 && path.indexOf('/pages/student/') !== 0 && path.indexOf('/pages/bootstrap/') !== 0) {
window.location.replace(landing);
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(landing);
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(landing);
return;
}
}());
</script>
<script><%= htmlWebpackPlugin.options.script %></script>
</head>
<body>
<div id="app"></div>
</body>
</html>