-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
156 lines (145 loc) · 5.46 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
<meta name="google" content="notranslate" />
<meta name="format-detection" content="telephone=no,email=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="shortcut icon" id="favicon">
<script src="./vendor/appInfo.js?ts=201912100001"></script>
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<script type='text/javascript'>
function GetRequest() {
var url = '?' + location.href.split('?')[1];
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
strs = str.split("&");
for (var i = 0; i < strs.length; i++) {
var keyValue = strs[i].split("=");
if (keyValue[0] == 'pagename') {
theRequest[keyValue[0]] = decodeURIComponent(keyValue[1]);
} else {
theRequest[keyValue[0]] = unescape(keyValue[1]);
}
}
}
return theRequest;
}
var params = GetRequest();
if (params && params['ttk-token']) {
sessionStorage['_accessToken'] = params['ttk-token'];
}
if (params && params['pagename'] && params['pagename'] != '') {
document.title = params['pagename'] + '';
}
var getCurrentUrl = location.href;
if (getCurrentUrl && getCurrentUrl.indexOf('?') > -1) {
if (getCurrentUrl.indexOf('edfx-app-register') == -1) {
if (getCurrentUrl.indexOf('simplelogin') == -1) {
if (getCurrentUrl.indexOf('edfx-app-portal') == -1) {
var getParams = getCurrentUrl.substr(getCurrentUrl.indexOf('?') + 1);
var pathName = location.origin;
if (pathName && getParams) {
window.location.href = pathName + "/#/ttk-edf-app-root/ttk-edf-app-login?" + getParams;
}
}
}
}
}
</script>
<style type="text/css">
html,
body,
#app {
height: 100%;
padding: 0;
margin: 0;
position: absolute;
z-index: 0;
}
html,
body {
overflow-y: hidden;
}
#infoStack {
display: none;
width: 100%;
max-height: 240px;
overflow: auto;
padding: 8px;
}
#infoTitle {
font-size: 14px;
}
#box>div {
top: 65px !important;
bottom: 10px;
width: 86% !important;
}
</style>
</head>
<body>
<div id="app" style="width:100%;height:100%"></div>
<div id="box" style="position:relative;z-index:10000"></div>
<!-- <input id="appDataInfo" type="hidden" /> -->
<script>if (typeof module === 'object') { window.module = module; module = undefined; }</script>
<!--[if lt IE 10]>
<script type='text/javascript' rel="prefetch" charset="utf-8" src='./vendor/es5.min.js'></script>
<![endif]-->
<script src='./vendor/polyfill.min.js' rel="prefetch" charset="utf-8"></script>
<script src='./vendor/vendor.dll.js' rel="prefetch" charset="utf-8"></script>
<script>if (window.module) module = window.module;</script>
</body>
<script id='jqscript' src='./vendor/jquery.min.js' rel="prefetch" charset="utf-8"></script>
<script type="text/javascript">
window._hmt = window._hmt || [];
window._vds = window._vds || [];
function downloadJSAtOnload() {
var j = document.createElement("script");
j.id = "jsresource";
var head = document.getElementsByTagName('HEAD').item(0);
// var l = document.createElement("script");
// l.src = "./bundle.min.js";
var style = document.createElement('link');
style.href = './vendor/css/animate.min.css';
style.rel = 'stylesheet';
style.type = 'text/css';
head.appendChild(style);
document.body.appendChild(j);
if (window.name.indexOf(';ttkhost=') == -1) {
window.name = window.name + ";ttkhost=" + document.referrer;
}
j.onload = function () {
var PC = IsPC();
if (!PC) {
$('#app').addClass('isMobile')
}
function IsPC() {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
var flag = true;
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
}
}
}
if (window.addEventListener)
window.addEventListener("load", downloadJSAtOnload, false);
else if (window.attachEvent)
window.attachEvent("onload", downloadJSAtOnload);
else window.onload = downloadJSAtOnload;
</script>
</html>