index.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. <!DOCTYPE html>
  2. <script>
  3. window.location.userName='';
  4. </script>
  5. <script>
  6. var pcUrl = 'https://campus.ahau.edu.cn/';
  7. var anUrl = 'https://campus.ahau.edu.cn/ahnyh5';
  8. var iosUrl = 'https://campus.ahau.edu.cn/ahny_ios';
  9. function redirectToHttps(url) {
  10. if (url.startsWith('http://')) {
  11. url = url.replace('http://', 'https://');
  12. }
  13. location.href = url;
  14. } function detectDevice() {
  15. var u = navigator.userAgent;
  16. var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;
  17. //android终端
  18. var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
  19. //ios终端
  20. var origin = location.origin;
  21. if (isIOS) {
  22. redirectToHttps(iosUrl);
  23. }
  24. if (isAndroid) {
  25. redirectToHttps(anUrl);
  26. }
  27. if (!isIOS && !isAndroid) {
  28. // redirectToHttps(pcUrl);
  29. }
  30. }
  31. detectDevice()
  32. </script>
  33. <!--
  34. HTML code used with Epic Games HTML5 projects
  35. much of this is for UE4 development purposes.
  36. to create a custom HTML file for your project:
  37. - make a copy of this file - or make one from scratch
  38. - and put it in: "your project folder"/Build/HTML/GameX.html.template
  39. -->
  40. <html lang="en">
  41. <head>
  42. <title>安徽农业大学虚拟校园</title>
  43. <meta charset="utf-8">
  44. <meta name="viewport" content="width=device-width, initial-scale=1">
  45. <style>
  46. * {
  47. margin: 0;
  48. padding: 0;
  49. }
  50. @font-face {
  51. font-family: YouSheBiaoTiHei;
  52. src: url('./fonts/YOUSHEBIAOTIHEI-2.TTF');
  53. }
  54. </style>
  55. <!-- <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> -->
  56. <!-- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> -->
  57. <!-- <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"> -->
  58. <script src="jquery-2.1.3.min.js"></script>
  59. <script src="bootstrap.min.js"></script>
  60. <link href="bootstrap.min.css" rel="stylesheet">
  61. <!-- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/fonts/glyphicons-halflings-regular.woff2 -->
  62. <!-- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/fonts/glyphicons-halflings-regular.woff -->
  63. <!-- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/fonts/glyphicons-halflings-regular.ttf -->
  64. <script src="./fonts/circle-progress.js"></script>
  65. <link href="AHND-HTML5-Shipping.css" rel="stylesheet">
  66. <script src="./axios.min.js"></script>
  67. </head>
  68. <style>
  69. #newjindu {
  70. width: 0;
  71. height: 100%;
  72. border-bottom-left-radius: 15px;
  73. border-bottom-right-radius: 15px;
  74. border-top-left-radius: 15px;
  75. border-top-right-radius: 15px;
  76. /* background: linear-gradient(to right, #4E75FF, #43A5FF); */
  77. background: linear-gradient(90deg, #74C44A 0%, #A1E76E 50%, #FFE824 100%);
  78. transition: width 0.1s;
  79. /* background-image: url('./img/jindubgicon1.png');
  80. background-size: 24px 24px; */
  81. position: relative;
  82. }
  83. .wrapper video {
  84. width: 100vw;
  85. height: 100vh;
  86. object-fit: cover;
  87. position: absolute;
  88. top: 0;
  89. left: 0;
  90. z-index: 1;
  91. }
  92. #progressBarBox {
  93. z-index: 2;
  94. width: 150px;
  95. height: 150px;
  96. margin-left: 50%;
  97. transform: translateX(-75px);
  98. background-image: url('./img/Rectangle.png');
  99. background-repeat: no-repeat;
  100. background-size: contain;
  101. position: relative;
  102. }
  103. #progressBar {
  104. font-family: YouSheBiaoTiHei;
  105. transform: translateY(-100%);
  106. color: #fff;
  107. font-size: 35px;
  108. width: 150px;
  109. height: 150px;
  110. /* background-color: aqua; */
  111. display: flex;
  112. justify-content: center;
  113. align-items: center;
  114. }
  115. #progresstitle {
  116. width: 100%;
  117. display: flex;
  118. justify-content: center;
  119. font-family: YouSheBiaoTiHei;
  120. color: rgba(255, 255, 255, 0.97);
  121. font-size: 55px;
  122. font-weight: 400;
  123. line-height: 52px;
  124. letter-spacing: 4px;
  125. text-align: center;
  126. z-index: 99999;
  127. position: fixed;
  128. bottom: 60vh;
  129. }
  130. .client-side {
  131. cursor: pointer;
  132. width: 80px;
  133. height: 74px;
  134. background-image: url('./img/appxiazai.png');
  135. background-repeat: no-repeat;
  136. background-size: 100% 100%;
  137. margin-right: 20px;
  138. }
  139. .client-side:hover {
  140. cursor: pointer;
  141. width: 80px;
  142. height: 74px;
  143. background-image: url('./img/appxiazai2.png');
  144. background-repeat: no-repeat;
  145. background-size: 100% 100%;
  146. margin-right: 20px;
  147. }
  148. #buttomjindu22 {
  149. width: 100%;
  150. display: flex;
  151. justify-content: center;
  152. flex-wrap: wrap;
  153. font-family: YouSheBiaoTiHei;
  154. position: fixed;
  155. bottom: 3vh;
  156. z-index: 999;
  157. }
  158. #progressBar2 {
  159. display: none;
  160. z-index: 3;
  161. width: 51px;
  162. line-height: 28px;
  163. height: 31.48px;
  164. font-family: 'Courier New', Courier, monospace;
  165. font-size: 14px;
  166. color: #fff;
  167. background-image: url('./img/Union.png');
  168. background-repeat: no-repeat;
  169. background-size: 100% 100%;
  170. }
  171. #newjindubox {
  172. display: none;
  173. width: 40vw;
  174. height: 24px;
  175. background-color: rgba(255, 255, 255, 0.26);
  176. border-bottom-left-radius: 15px;
  177. border-bottom-right-radius: 15px;
  178. border-top-left-radius: 15px;
  179. border-top-right-radius: 15px;
  180. }
  181. </style>
  182. <body>
  183. <div style=" position: fixed; z-index: -2;">
  184. <audio controls id="audio_h5" src=""></audio>
  185. </div>
  186. <!--<button onclick = "CCall()"> CCall </button>-->
  187. <div id="inputbox"
  188. style="display: flex;align-items: center;justify-content: center;z-index: -1;position: fixed;width: 100%;top: 5vh;">
  189. <input maxlength="11"
  190. style="border: none; border-radius: 5px; width: 50vw; height: 30px; color: #fff; background: #0B0B0BB2;"
  191. id="searchinput" type="text">
  192. <button style="height: 30px;background-color: #D48E3B;color: #fff;border: none;"
  193. onclick="searchtext()">搜索</button>
  194. </div>
  195. <div id="myVideoBox" style="width: 40vw; margin-left:30vw;transform: translateY(50%);position: fixed;z-index: -1;">
  196. <img onclick="closevideo()" style="width: 30px;position: absolute;right: 0;z-index: 99;"
  197. src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANAAAADQCAYAAAB2pO90AAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA0rSURBVHgB7Z1Nb1bHFcdPynsgxm5acBujFLdy2yRqKrVRHanqhgVdeAV7JD6BV2ziTVdsWPkrsOcToGabumoTVVVqY6ugFkQhTWLjFkPixMn9596JjXne7r1n5s6Z+f+k0QOWF9jc3z0zZ87MESGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIy4AUhXXCoGseqcbgYB/d8fRBb1ecXxXhcfW4XY1NIcCiQXyDDd4txvBhjxXip+tqL4gfI9EhKoT6t/rxZ/Z14gALp8nIxTkopDYTxJUpdnkgpk5PqEyEqUKB2QJDJYpyWUpyDYgMXqR4W44HsTgtJTShQfRBlnDSxRJi2IEI9qAajUw0o0GhAlKlqpCJNP5xMd4SRaSgUqD9Y7J+RMtK8LHmCaHSvGHeF9IQCPQ/EOVuMabG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Suh0gvEHm8XJDYlNgEAujfgs4O5i+nJ6pgzaPWXVuLGAUCeMuclIw6fpOBIGmg2ppRi1gFApAIU7kjQnIGSYMlKYuQoyNmgfALw+V+k5JIsy5SG8iDpMHnEikxCwRQoYDwTYnyw8kTTcatF7ELBChRfpiQB1gQCFCifDAjD7AiEKBE6WNKHmBJIECJ0sWcPMCaQIASpcejYvxZjMkDLAoEIBHOwL8k3Gy1Dl6GKCSONlU9CKsCAewT3a/+zGPhNsE9bjhQGeUm6ShYFsiBc0QsQLUHCkPXxDghOtSF4lgx3hbDTY0zAckCTNmSuAsjhQjkcMkFdNPmuihOMFswl2kbREoCAUjEdVF8YIq9ImVFtdn1Ti9SmsLth1O6OECKGomCJK8vSy0C7QXRyF02zmjUDTgE94HsXqKZHClHoL0wGoUFax1k2ZK/NDMXgRxTxZgRiuQLrHUQdbJpKp2bQADRaLoYZ4VoAXEgDTZGs7plNkeBHBAJ0eiMkDagJymiTjKp6TrkLJCDIjUD65xVyfxGWQq0C0UaDUQcTNfYVUMoUC+cSEh9M9lQku0aZxgUaDDI2iEi5bqPhOkZyqMQdShODyjQaCAqIWuHQ3ypRyXXb/Se8LL/oVCg+iAanZa0ZIIoiDTot8M2MzWgQO1AZJqsxpjYOWKONQ2SAE4aRpqGUCBdEJ0g0vekPG4eS4SCIP8rxsdSisMoowQF8stBKS/Jd1IdFL+RCqJgsQ9JUAWNzc2PhQkAb1Cg7oBYEAoyHZNdqYZFLVy+ASG2q/GkGu7rhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCG6fA3tblDotuDWwwAAAABJRU5ErkJggg=="
  198. alt="">
  199. <video style="width: 100%;height: 100%;" id="myVideo" crossorigin="anonymous" src="" controls></video>
  200. </div>
  201. <div class="wrapper" id="mainarea" style='z-index: 9999;'>
  202. <div class="alert alert-warning centered-axis-xy"
  203. style="min-height: 20px;width: 100%;height: 100vh;margin: 0; display:block;" role="alert"
  204. id="compilingmessage">
  205. <video src="./fonts/bg.mp4" autoplay="autoplay" loop="loop" muted="muted"></video>
  206. <div id='loadTasks' style="opacity: 0;width: 0;"> </div>
  207. <div style="position: fixed; top: 0; left: 0;width: 100%;height: 100vh; z-index: 999;">
  208. <img style="position: absolute;left: 40px;top: 40px;" src="./img/logo2.png" alt="">
  209. </div>
  210. <div id="progresstitle">安徽农业大学虚拟校园</div>
  211. <div id="buttomjindu22">
  212. <div id="newjindubox">
  213. <div id="newjindu">
  214. <div
  215. style=" position: absolute ;top: -55px; right: -20px;display: flex;justify-content: right;margin-bottom: 10px;">
  216. <div id="progressBar2">
  217. 0%
  218. </div>
  219. </div>
  220. <img style="position: absolute; top: -25px;right: -20px; " src="./img/jinduicon2.png" alt="">
  221. </div>
  222. </div>
  223. <div id="progressBar3"
  224. style="width: 100%;color: #FFFFFF;font-size: 18px;margin-top: 15px; font-family: 'Courier New', Courier, monospace;">
  225. 下载资源中
  226. </div>
  227. </div>
  228. <!-- <div style="z-index: 9999; height: 150px; position: fixed;z-index: 99;bottom: 53vh;left: 50vw;transform: translateX(-75px);" >
  229. <div id="progressBarBox" style="display: none;">
  230. <img style="position: absolute; width: 150px;height: 150px;top: 0;left: 0;z-index: -1;" src="./img/Rectangle2.png" alt="">
  231. <div id="progressBar" style="z-index: 3;" >
  232. 0%
  233. </div>
  234. </div>
  235. </div> -->
  236. </div>
  237. </div>
  238. <!-- The "tabindex=0" specifier on the canvas is important to allow it to capture keyboard focus when clicking on it with a mouse -->
  239. <canvas tabindex=0 id="canvas" class="emscripten" oncontextmenu="event.preventDefault()"
  240. style="display:none;position: absolute;z-index: 999;">
  241. </div>
  242. <div class="buttonarea text-center" id="buttonarea" style="display: none;">
  243. <button type="button" class="btn btn-primary"
  244. onclick="try { Module['pauseMainLoop'](); } catch(e) {console.error(e);}" title="Pause">
  245. <span class="glyphicon glyphicon-pause" aria-hidden="true"></span><span class="buttontext"> Pause</span>
  246. </button>
  247. <button type="button" class="btn btn-primary"
  248. onclick="try { Module['resumeMainLoop'](); } catch(e) {console.error(e);}" title="Resume">
  249. <span class="glyphicon glyphicon-play" aria-hidden="true"></span><span class="buttontext"> Resume</span>
  250. </button>
  251. <!--<button type="button" class="btn btn-primary" onclick="var w = document.getElementById('logwindow'); w.style.display = w.style.display ? '' : 'none';">Toggle Log</button></div>-->
  252. <button type="button" class="btn btn-primary" id='clear_indexeddb'
  253. onclick="try { deleteIndexedDBStorage(); } catch(e) {console.error(e);}" title="Clear IndexedDB">
  254. <span class="glyphicon glyphicon-trash" aria-hidden="true"></span><span class="buttontext"> Clear
  255. IndexedDB</span>
  256. </button>
  257. <button type="button" class="btn btn-primary" id="fullscreen_request" title="Fullscreen">
  258. <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span><span class="buttontext">
  259. Fullscreen</span>
  260. </button>
  261. </div>
  262. <div class="texthalf text-normal jumbotron " id="logwindow" style='display:none'></div>
  263. <script>
  264. window.addEventListener('beforeunload', function (event) {
  265. console.log('页面即将刷新或关闭');
  266. sessionStorage.setItem('tourist', 'false');
  267. });
  268. if (JSON.parse(sessionStorage.getItem('tourist'))) {
  269. console.log('okokoaaaa');
  270. fetch('https://campus.ahau.edu.cn/cmccr-server/center/accessLog/record/v1/add?carrier=PC&accessSource=', {
  271. method: 'POST', // 指定请求方法
  272. headers: {
  273. 'Content-Type': 'application/json' // 设置头部内容类型为JSON
  274. },
  275. })
  276. .then(response => {
  277. if (response.ok) {
  278. return response.json(); // 如果响应成功,解析JSON
  279. }
  280. throw new Error('Network response was not ok.'); // 如果响应不成功,抛出错误
  281. })
  282. .then(jsonResponse => {
  283. console.log('JSON response:', jsonResponse); // 处理JSON响应数据
  284. })
  285. .catch(error => {
  286. console.error('Request failed:', error); // 处理错误
  287. });
  288. } else {
  289. //获取ticked
  290. // 获取URLSearchParams对象
  291. const urlParams = new URLSearchParams(window.location.search);
  292. // 从URLSearchParams对象中获取'ticket'参数的值
  293. const ticket = urlParams.get('ticket');
  294. if (ticket) {
  295. //如果获取到tick
  296. console.log('URL contains the tick parameter.');
  297. //casLoginUrl: http://ids2.just.edu.cn/cas/serviceValidate?ticket=ST-3376300-Q7f9cOcQ60636vrmzUCV-cas-66748c5968-6kj2d&service=https://gis.just.edu.cn/
  298. axios.get('https://campus.ahau.edu.cn/cmccr-server/center/cas/v1/getUser', {
  299. params: { casLoginUrl: 'https://ids.ahau.edu.cn/cas/' + `serviceValidate?ticket=${ticket}` + '&service=https://campus.ahau.edu.cn/' }
  300. }).then(res => {
  301. console.log('cas=====', res)
  302. let username=''
  303. if (res.data.indexOf('<cas:user>') >= 0) {
  304. username = res.data.split('<cas:user>')[1].split('</cas:user>')[0]
  305. } else if (res.data.indexOf('<sso:user>') >= 0) {
  306. username = res.data.split('<sso:user>')[1].split('</sso:user>')[0]
  307. }
  308. if (username) {
  309. localStorage.setItem('username', username)
  310. }
  311. if (localStorage.getItem('newtime')) {
  312. if (new Date().getTime() - localStorage.getItem('newtime') > 3600000) {
  313. localStorage.removeItem('newtime')
  314. localStorage.removeItem('username')
  315. window.location.href = location.origin + '/login.html';
  316. }else {
  317. }
  318. }else {
  319. localStorage.setItem('newtime', new Date().getTime())
  320. }
  321. window.location.userName=localStorage.getItem('username')
  322. }).catch(err => {
  323. console.log('cas2======', err)
  324. })
  325. } else {
  326. console.log('没有获取到游客token跳转登录');
  327. window.location.href = location.origin + '/login.html';
  328. }
  329. }
  330. </script>
  331. <script>
  332. var now = new Date().getTime();
  333. document.write('<script src="AHND-HTML5-Shipping.UE4.js?t=' + now + '"><\/script\>');
  334. </script>
  335. </body>
  336. </html>