index.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. <!DOCTYPE html>
  2. <script>
  3. window.myurl='https://campus.ahau.edu.cn/cmccr-server';
  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. @font-face {
  47. font-family: YouSheBiaoTiHei;
  48. src: url('./fonts/YOUSHEBIAOTIHEI-2.TTF');
  49. }
  50. </style>
  51. <!-- <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> -->
  52. <!-- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> -->
  53. <!-- <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"> -->
  54. <script src="jquery-2.1.3.min.js"></script>
  55. <script src="bootstrap.min.js"></script>
  56. <link href="bootstrap.min.css" rel="stylesheet">
  57. <!-- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/fonts/glyphicons-halflings-regular.woff2 -->
  58. <!-- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/fonts/glyphicons-halflings-regular.woff -->
  59. <!-- https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/fonts/glyphicons-halflings-regular.ttf -->
  60. <script src="./fonts/circle-progress.js"></script>
  61. <link href="AHND-HTML5-Shipping.css" rel="stylesheet">
  62. </head>
  63. <script>
  64. // 定义数据库名称和版本
  65. const dbName = 'UE4_assetDatabase_AHND';
  66. const dbVersion = 202408141326;
  67. const storeName = 'FILES';
  68. function clearIndexedDB(dbName) {
  69. return new Promise((resolve, reject) => {
  70. const request = window.indexedDB.deleteDatabase(dbName);
  71. request.onsuccess = () => resolve();
  72. request.onerror = event => reject(event.target.errorCode);
  73. });
  74. }
  75. const userAgent = navigator.userAgent || navigator.vendor || window.opera;
  76. if (userAgent.match(/iPhone|iPad|iPod/i)) {
  77. // 打开数据库
  78. let request = indexedDB.open(dbName, dbVersion);
  79. request.onerror = function(event) {
  80. console.error('数据库打开失败');
  81. };
  82. request.onsuccess = function(event) {
  83. const db = request.result;
  84. checkDataInStore(db);
  85. console.log('22222');
  86. };
  87. request.onupgradeneeded = function(event) {
  88. let db = event.target.result;
  89. if (!db.objectStoreNames.contains(storeName)) {
  90. db.createObjectStore(storeName, { keyPath: 'id' });
  91. }
  92. };
  93. }
  94. function checkDataInStore(db) {
  95. // 检查对象存储空间是否有数据
  96. let store = db.transaction(storeName, 'readonly').objectStore(storeName);
  97. let countRequest = store.count();
  98. countRequest.onsuccess = function() {
  99. if (countRequest.result > 0) {
  100. console.log('对象存储空间有数据');
  101. // 使用方法:
  102. clearIndexedDB('UE4_assetDatabase_MXGuide').then(() => {
  103. console.log('IndexedDB22 cleared');
  104. }).catch(error => {
  105. console.error('Error clearing IndexedDB:', error);
  106. });
  107. // 使用方法:
  108. clearIndexedDB('UE4_assetDatabase_h5_0824').then(() => {
  109. console.log('IndexedDB cleared');
  110. location.reload(true);
  111. }).catch(error => {
  112. console.error('Error clearing IndexedDB:', error);
  113. });
  114. } else {
  115. console.log('对象存储空间没有数据');
  116. }
  117. };
  118. countRequest.onerror = function(event) {
  119. console.error('无法计数对象存储空间的数据');
  120. };
  121. }
  122. </script>
  123. <style>
  124. .wrapper .bgimg{
  125. width: 100%;height: 100%;position:absolute;top: 0;left: 0;z-index: 1;
  126. }
  127. #progressBarBox {
  128. z-index: 2;
  129. width: 150px;
  130. height: 150px;
  131. margin-left: 50%;
  132. transform: translateX(-75px);
  133. background-image: url('./img/Rectangle.png');
  134. background-repeat: no-repeat;
  135. background-size: contain;
  136. position: relative;
  137. }
  138. #progressBar {
  139. font-family: YouSheBiaoTiHei;
  140. transform: translateY(-100%);
  141. color: #fff;
  142. font-size: 35px;
  143. width: 150px;
  144. height: 150px;
  145. /* background-color: aqua; */
  146. display: flex;
  147. justify-content: center;
  148. align-items: center;
  149. }
  150. @font-face {
  151. font-family: YouSheBiaoTiHei;
  152. src: url('./fonts/YOUSHEBIAOTIHEI-2.TTF');
  153. }
  154. #progresstitle {
  155. width: 100%;
  156. display: flex;
  157. justify-content: center;
  158. font-family: YouSheBiaoTiHei;
  159. color: rgba(255, 255, 255, 0.97);
  160. font-size: 55px;
  161. font-weight: 400;
  162. line-height: 52px;
  163. letter-spacing: 4px;
  164. text-align: center;
  165. z-index: 99999;
  166. position: fixed;
  167. bottom: 200px;
  168. }
  169. #buttomjindu22 {
  170. width: 100%;
  171. display: flex;
  172. justify-content: center;
  173. flex-wrap: wrap;
  174. font-family: YouSheBiaoTiHei;
  175. position: fixed;
  176. bottom: 3vh;
  177. }
  178. #progressBar2 {
  179. display: none;
  180. z-index: 3;
  181. width: 51px;
  182. line-height: 28px;
  183. height: 31.48px;
  184. font-family: 'Courier New', Courier, monospace;
  185. font-size: 14px;
  186. color: #fff;
  187. background-image: url('./img/Union.png');
  188. background-repeat: no-repeat;
  189. background-size: 100% 100%;
  190. }
  191. #newjindubox {
  192. display: none;
  193. width: 400px;
  194. height: 24px;
  195. background-color: rgba(255, 255, 255, 0.26);
  196. border-bottom-left-radius: 15px;
  197. border-bottom-right-radius: 15px;
  198. border-top-left-radius: 15px;
  199. border-top-right-radius: 15px;
  200. }
  201. #newjindu {
  202. width: 0;
  203. height: 100%;
  204. border-bottom-left-radius: 15px;
  205. border-bottom-right-radius: 15px;
  206. border-top-left-radius: 15px;
  207. border-top-right-radius: 15px;
  208. /* background: linear-gradient(to right, #4E75FF, #43A5FF); */
  209. background: linear-gradient(90deg, #74C44A 0%, #A1E76E 50%, #FFE824 100%);
  210. transition: width 0.1s;
  211. position: relative;
  212. }
  213. </style>
  214. <body>
  215. <div style=" position: fixed; z-index: -2;" >
  216. <audio controls id="audio_h5" src=""></audio>
  217. </div>
  218. <!--<button onclick = "CCall()"> CCall </button>-->
  219. <div class="wrapper" id="mainarea">
  220. <div id="inputbox" style="display: flex;align-items: center;justify-content: center;z-index: -1;position: fixed;width: 100%;top: 5vh;">
  221. <input style="border: none; border-radius: 5px; width: 50vw; height: 30px; color: #fff; background: #0B0B0BB2;" id="searchinput" type="text">
  222. <button style="height: 30px;background-color: #D48E3B;margin-left: 5px; color: #fff;border: none;" onclick="searchtext()">搜索</button>
  223. </div>
  224. <div id="myVideoBox"
  225. style="width: 100%;height: 100%; background-color: rgb(0 0 0 / 63%); position: fixed;z-index: -1;">
  226. <img onclick="closevideo()" style="width: 30px;position: absolute;right: 0;z-index: 99;"
  227. src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANAAAADQCAYAAAB2pO90AAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA0rSURBVHgB7Z1Nb1bHFcdPynsgxm5acBujFLdy2yRqKrVRHanqhgVdeAV7JD6BV2ziTVdsWPkrsOcToGabumoTVVVqY6ugFkQhTWLjFkPixMn9596JjXne7r1n5s6Z+f+k0QOWF9jc3z0zZ87MESGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIy4AUhXXCoGseqcbgYB/d8fRBb1ecXxXhcfW4XY1NIcCiQXyDDd4txvBhjxXip+tqL4gfI9EhKoT6t/rxZ/Z14gALp8nIxTkopDYTxJUpdnkgpk5PqEyEqUKB2QJDJYpyWUpyDYgMXqR4W44HsTgtJTShQfRBlnDSxRJi2IEI9qAajUw0o0GhAlKlqpCJNP5xMd4SRaSgUqD9Y7J+RMtK8LHmCaHSvGHeF9IQCPQ/EOVuMabGzpvENohJkWhVGpWegQLsgCQBxpoQMAhGJIlVQoHJ6NiP5TtOaQpEkb4GQDIA4jDjtyFqkHAXiGscPdyTDzF1uAkEaRB2K4wckGxCNssna5SIQEgSvCdc5oYBI70kG0SgHgWaqQcKzWo1kSVkgRJ03pSzqJN2RdDQ6IGmCtc4vpTxrQ7rFJW1AcnV2qQmE/6zfFOPVYnxHSExg/YnZwIYkdD4pJYEwZXtbOGWLmRNSVrLjGEUSEqUiEKZsv5bhx6FJ97gpHQTaEOOkINDrwiybRU5Vn6bXRZYFwpvsV8JSHMu4ddFHxdgRg1gVCHVsSBZw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FdNPmuihOMFswl2kbREoCAUjEdVF8YIq9ImVFtdn1Ti9SmsLth1O6OECKGomCJK8vSy0C7QXRyF02zmjUDTgE94HsXqKZHClHoL0wGoUFax1k2ZK/NDMXgRxTxZgRiuQLrHUQdbJpKp2bQADRaLoYZ4VoAXEgDTZGs7plNkeBHBAJ0eiMkDagJymiTjKp6TrkLJCDIjUD65xVyfxGWQq0C0UaDUQcTNfYVUMoUC+cSEh9M9lQku0aZxgUaDDI2iEi5bqPhOkZyqMQdShODyjQaCAqIWuHQ3ypRyXXb/Se8LL/oVCg+iAanZa0ZIIoiDTot8M2MzWgQO1AZJqsxpjYOWKONQ2SAE4aRpqGUCBdEJ0g0vekPG4eS4SCIP8rxsdSisMoowQF8stBKS/Jd1IdFL+RCqJgsQ9JUAWNzc2PhQkAb1Cg7oBYEAoyHZNdqYZFLVy+ASG2q/GkGu7rhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCG6fA3tblDotuDWwwAAAABJRU5ErkJggg=="
  228. alt="">
  229. <video style="width: 500px;height: auto;margin-left: 24%; margin-top: 50px;z-index: 99999;" id="myVideo" crossorigin="anonymous" src="" controls></video>
  230. </div>
  231. <div class="alert alert-warning centered-axis-xy"
  232. style="min-height: 20px;width: 100%;height: 100%;margin: 0; display:block;" role="alert"
  233. id="compilingmessage">
  234. <img class="bgimg" src="./fonts/bg.png">
  235. <div id='loadTasks' style="opacity: 0;width: 0;"> </div>
  236. <div
  237. style="position: fixed; top: 0; left: 0;width: 100%;height: 100vh;background-color: #00000071;; z-index: 999;">
  238. <img style="position: absolute;left: 40px;top: 40px;" src="./img/logo2.png" alt="">
  239. <div id="progresstitle">
  240. <img style="width: 350px;" src="./img/logotitle.png" alt="" srcset="">
  241. </div>
  242. <div id="buttomjindu22">
  243. <div id="newjindubox">
  244. <div id="newjindu">
  245. <div style=" position: absolute ;top: -55px; right: -20px;display: flex;justify-content: right;margin-bottom: 10px;">
  246. <div id="progressBar2">
  247. 0%
  248. </div>
  249. </div>
  250. <img style="position: absolute; top: -25px;right: -20px; " src="./img/jinduicon2.png" alt="">
  251. </div>
  252. </div>
  253. <div id="progressBar3"
  254. style="width: 100%;color: #FFFFFF;font-size: 18px;margin-top: 15px; font-family: 'Courier New', Courier, monospace;">
  255. 下载资源中
  256. </div>
  257. </div>
  258. <!-- <div style="z-index: 9999; height: 150px; position: fixed;z-index: 99;bottom: 53vh;left: 50vw;transform: translateX(-75px);" >
  259. <div id="progressBarBox" style="display: none;">
  260. <img style="position: absolute; width: 150px;height: 150px;top: 0;left: 0;z-index: -1;" src="./img/Rectangle2.png" alt="">
  261. <div id="progressBar" style="z-index: 3;" >
  262. 0%
  263. </div>
  264. </div>
  265. </div> -->
  266. </div>
  267. </div>
  268. <!-- The "tabindex=0" specifier on the canvas is important to allow it to capture keyboard focus when clicking on it with a mouse -->
  269. <canvas tabindex=0 id="canvas" class="emscripten" oncontextmenu="event.preventDefault()" style="display:none;">
  270. </div>
  271. <div class="buttonarea text-center" id="buttonarea" style="display: none;">
  272. <button type="button" class="btn btn-primary"
  273. onclick="try { Module['pauseMainLoop'](); } catch(e) {console.error(e);}" title="Pause">
  274. <span class="glyphicon glyphicon-pause" aria-hidden="true"></span><span class="buttontext"> Pause</span>
  275. </button>
  276. <button type="button" class="btn btn-primary"
  277. onclick="try { Module['resumeMainLoop'](); } catch(e) {console.error(e);}" title="Resume">
  278. <span class="glyphicon glyphicon-play" aria-hidden="true"></span><span class="buttontext"> Resume</span>
  279. </button>
  280. <!--<button type="button" class="btn btn-primary" onclick="var w = document.getElementById('logwindow'); w.style.display = w.style.display ? '' : 'none';">Toggle Log</button></div>-->
  281. <button type="button" class="btn btn-primary" id='clear_indexeddb'
  282. onclick="try { deleteIndexedDBStorage(); } catch(e) {console.error(e);}" title="Clear IndexedDB">
  283. <span class="glyphicon glyphicon-trash" aria-hidden="true"></span><span class="buttontext"> Clear
  284. IndexedDB</span>
  285. </button>
  286. <button type="button" class="btn btn-primary" id="fullscreen_request" title="Fullscreen">
  287. <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span><span class="buttontext">
  288. Fullscreen</span>
  289. </button>
  290. </div>
  291. <div class="texthalf text-normal jumbotron " id="logwindow" style='display:none'></div>
  292. <script>
  293. // $('#progressBarBox').circleProgress({
  294. // value: 0.01,
  295. // size: 150,
  296. // thickness:7,
  297. // emptyFill:"rgba(0, 0, 0, .1)",
  298. // fill: {
  299. // gradient: ["#A3F9FF"]
  300. // }
  301. // });
  302. </script>
  303. <script>
  304. var now = new Date().getTime();
  305. document.write('<script src="AHND-HTML5-Shipping.UE4.js?t=' + now + '"><\/script\>');
  306. </script>
  307. </body>
  308. <script>
  309. const forceLandscape = ((id = '#mainarea') => {
  310. const handler = () => {
  311. let width = document.documentElement.clientWidth;
  312. let height = document.documentElement.clientHeight;
  313. let targetDom = document.querySelector(id);
  314. if (!targetDom) return;
  315. // 如果宽度比高度大,则认为处于横屏状态
  316. // 也可以获取 window.orientation 方向来判断屏幕状态
  317. if (width > height) {
  318. targetDom.style.position = 'absolute';
  319. targetDom.style.width = `${width}px`;
  320. targetDom.style.height = `${height}px`;
  321. targetDom.style.left = `${0}px`;
  322. targetDom.style.top = `${0}px`;
  323. targetDom.style.transform = 'none';
  324. targetDom.style.transformOrigin = '50% 50%';
  325. } else {
  326. targetDom.style.position = 'absolute';
  327. targetDom.style.width = `${height}px`;
  328. targetDom.style.height = `${width}px`;
  329. targetDom.style.left = `${0 - (height - width) / 2}px`;
  330. targetDom.style.top = `${(height - width) / 2}px`;
  331. targetDom.style.transform = 'rotate(90deg)';
  332. targetDom.style.transformOrigin = '50% 50%';
  333. }
  334. };
  335. const handleResize = () => {
  336. setTimeout(() => {
  337. handler();
  338. resizeCanvas()
  339. }, 300);
  340. };
  341. window.addEventListener('resize', handleResize);
  342. handler();
  343. })();
  344. </script>
  345. </html>