index.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  1. <!DOCTYPE html>
  2. <html lang="zh-cmn-Hans">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  7. <title>可知可视项目平台</title>
  8. <link rel="icon" href="<%= BASE_URL %>logo.png">
  9. <script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
  10. <style>
  11. html,
  12. body,
  13. #app {
  14. height: 100%;
  15. margin: 0px;
  16. padding: 0px;
  17. }
  18. .chromeframe {
  19. margin: 0.2em 0;
  20. background: #ccc;
  21. color: #000;
  22. padding: 0.2em 0;
  23. }
  24. #loader-wrapper {
  25. position: fixed;
  26. top: 0;
  27. left: 0;
  28. width: 100%;
  29. height: 100%;
  30. z-index: 999999;
  31. }
  32. #loader {
  33. display: block;
  34. position: relative;
  35. left: 50%;
  36. top: 50%;
  37. width: 120px;
  38. height: 120px;
  39. margin: -75px 0 0 -75px;
  40. border-radius: 50%;
  41. border: 3px solid transparent;
  42. /* COLOR 1 */
  43. border-top-color: #FFF;
  44. -webkit-animation: spin 2s linear infinite;
  45. /* Chrome, Opera 15+, Safari 5+ */
  46. -ms-animation: spin 2s linear infinite;
  47. /* Chrome, Opera 15+, Safari 5+ */
  48. -moz-animation: spin 2s linear infinite;
  49. /* Chrome, Opera 15+, Safari 5+ */
  50. -o-animation: spin 2s linear infinite;
  51. /* Chrome, Opera 15+, Safari 5+ */
  52. animation: spin 2s linear infinite;
  53. /* Chrome, Firefox 16+, IE 10+, Opera */
  54. z-index: 1001;
  55. }
  56. #loader:before {
  57. content: "";
  58. position: absolute;
  59. top: 5px;
  60. left: 5px;
  61. right: 5px;
  62. bottom: 5px;
  63. border-radius: 50%;
  64. border: 3px solid transparent;
  65. /* COLOR 2 */
  66. border-top-color: #FFF;
  67. -webkit-animation: spin 3s linear infinite;
  68. /* Chrome, Opera 15+, Safari 5+ */
  69. -moz-animation: spin 3s linear infinite;
  70. /* Chrome, Opera 15+, Safari 5+ */
  71. -o-animation: spin 3s linear infinite;
  72. /* Chrome, Opera 15+, Safari 5+ */
  73. -ms-animation: spin 3s linear infinite;
  74. /* Chrome, Opera 15+, Safari 5+ */
  75. animation: spin 3s linear infinite;
  76. /* Chrome, Firefox 16+, IE 10+, Opera */
  77. }
  78. #loader:after {
  79. content: "";
  80. position: absolute;
  81. top: 15px;
  82. left: 15px;
  83. right: 15px;
  84. bottom: 15px;
  85. border-radius: 50%;
  86. border: 3px solid transparent;
  87. border-top-color: #FFF;
  88. /* COLOR 3 */
  89. -moz-animation: spin 1.5s linear infinite;
  90. /* Chrome, Opera 15+, Safari 5+ */
  91. -o-animation: spin 1.5s linear infinite;
  92. /* Chrome, Opera 15+, Safari 5+ */
  93. -ms-animation: spin 1.5s linear infinite;
  94. /* Chrome, Opera 15+, Safari 5+ */
  95. -webkit-animation: spin 1.5s linear infinite;
  96. /* Chrome, Opera 15+, Safari 5+ */
  97. animation: spin 1.5s linear infinite;
  98. /* Chrome, Firefox 16+, IE 10+, Opera */
  99. }
  100. @-webkit-keyframes spin {
  101. 0% {
  102. -webkit-transform: rotate(0deg);
  103. /* Chrome, Opera 15+, Safari 3.1+ */
  104. -ms-transform: rotate(0deg);
  105. /* IE 9 */
  106. transform: rotate(0deg);
  107. /* Firefox 16+, IE 10+, Opera */
  108. }
  109. 100% {
  110. -webkit-transform: rotate(360deg);
  111. /* Chrome, Opera 15+, Safari 3.1+ */
  112. -ms-transform: rotate(360deg);
  113. /* IE 9 */
  114. transform: rotate(360deg);
  115. /* Firefox 16+, IE 10+, Opera */
  116. }
  117. }
  118. @keyframes spin {
  119. 0% {
  120. -webkit-transform: rotate(0deg);
  121. /* Chrome, Opera 15+, Safari 3.1+ */
  122. -ms-transform: rotate(0deg);
  123. /* IE 9 */
  124. transform: rotate(0deg);
  125. /* Firefox 16+, IE 10+, Opera */
  126. }
  127. 100% {
  128. -webkit-transform: rotate(360deg);
  129. /* Chrome, Opera 15+, Safari 3.1+ */
  130. -ms-transform: rotate(360deg);
  131. /* IE 9 */
  132. transform: rotate(360deg);
  133. /* Firefox 16+, IE 10+, Opera */
  134. }
  135. }
  136. #loader-wrapper .loader-section {
  137. position: fixed;
  138. top: 0;
  139. width: 51%;
  140. height: 100%;
  141. background: #49a9ee;
  142. /* Old browsers */
  143. z-index: 1000;
  144. -webkit-transform: translateX(0);
  145. /* Chrome, Opera 15+, Safari 3.1+ */
  146. -ms-transform: translateX(0);
  147. /* IE 9 */
  148. transform: translateX(0);
  149. /* Firefox 16+, IE 10+, Opera */
  150. }
  151. #loader-wrapper .loader-section.section-left {
  152. left: 0;
  153. }
  154. #loader-wrapper .loader-section.section-right {
  155. right: 0;
  156. }
  157. /* Loaded */
  158. .loaded #loader-wrapper .loader-section.section-left {
  159. -webkit-transform: translateX(-100%);
  160. /* Chrome, Opera 15+, Safari 3.1+ */
  161. -ms-transform: translateX(-100%);
  162. /* IE 9 */
  163. transform: translateX(-100%);
  164. /* Firefox 16+, IE 10+, Opera */
  165. -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
  166. transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
  167. }
  168. .loaded #loader-wrapper .loader-section.section-right {
  169. -webkit-transform: translateX(100%);
  170. /* Chrome, Opera 15+, Safari 3.1+ */
  171. -ms-transform: translateX(100%);
  172. /* IE 9 */
  173. transform: translateX(100%);
  174. /* Firefox 16+, IE 10+, Opera */
  175. -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
  176. transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
  177. }
  178. .loaded #loader {
  179. opacity: 0;
  180. -webkit-transition: all 0.3s ease-out;
  181. transition: all 0.3s ease-out;
  182. }
  183. .loaded #loader-wrapper {
  184. visibility: hidden;
  185. -webkit-transform: translateY(-100%);
  186. /* Chrome, Opera 15+, Safari 3.1+ */
  187. -ms-transform: translateY(-100%);
  188. /* IE 9 */
  189. transform: translateY(-100%);
  190. /* Firefox 16+, IE 10+, Opera */
  191. -webkit-transition: all 0.3s 1s ease-out;
  192. transition: all 0.3s 1s ease-out;
  193. }
  194. /* JavaScript Turned Off */
  195. .no-js #loader-wrapper {
  196. display: none;
  197. }
  198. .no-js h1 {
  199. color: #222222;
  200. }
  201. #loader-wrapper .load_title {
  202. font-family: 'Open Sans';
  203. color: #FFF;
  204. font-size: 14px;
  205. width: 100%;
  206. text-align: center;
  207. z-index: 9999999999999;
  208. position: absolute;
  209. top: 60%;
  210. opacity: 1;
  211. line-height: 30px;
  212. }
  213. #loader-wrapper .load_title span {
  214. font-weight: normal;
  215. font-style: italic;
  216. font-size: 14px;
  217. color: #FFF;
  218. opacity: 0.5;
  219. }
  220. /* 滚动条优化 start */
  221. ::-webkit-scrollbar{
  222. width:8px;
  223. height:8px;
  224. }
  225. ::-webkit-scrollbar-track{
  226. background: #f6f6f6;
  227. border-radius:2px;
  228. }
  229. ::-webkit-scrollbar-thumb{
  230. background: #cdcdcd;
  231. border-radius:2px;
  232. }
  233. ::-webkit-scrollbar-thumb:hover{
  234. background: #747474;
  235. }
  236. ::-webkit-scrollbar-corner {
  237. background: #f6f6f6;
  238. }
  239. /* 滚动条优化 end */
  240. </style>
  241. <!-- 全局配置 -->
  242. <script src="<%= BASE_URL %>static/config.js"></script>
  243. </head>
  244. <body>
  245. <div id="app">
  246. <div id="loader-wrapper">
  247. <div id="loader"></div>
  248. <div class="loader-section section-left"></div>
  249. <div class="loader-section section-right"></div>
  250. <div class="load_title">正在加载 可知可视项目平台,请耐心等待
  251. </div>
  252. <!-- <div class="homeContent">
  253. <ul>
  254. <li>
  255. <a id="xinchou" href="javascript:go_url('http://192.168.2.216:3000','');">
  256. <img class="bj" src="img/diamonds.png"/>
  257. <div class="">
  258. <img src="img/emolument.png"/>
  259. <p>前往成本可知可视系统</p>
  260. </div>
  261. </a>
  262. </li>
  263. </ul>
  264. </div> -->
  265. </div>
  266. </div>
  267. </body>
  268. <!-- <script>
  269. // console.log(111111111111)
  270. var href = "http://192.168.2.216:3000/"
  271. // var href = "http://localhost:3000"
  272. // var href = "http://10.67.0.64:9988"
  273. // 1.
  274. window.onload = function () {
  275. var is_chrome = /chrome/.test(navigator.userAgent.toLowerCase());
  276. // 判断是否谷歌浏览器
  277. if (!is_chrome) {
  278. console.log(!is_chrome)
  279. console.log('1',href)
  280. setTimeout(toGG(href), 100);
  281. } else {
  282. console.log('谷歌',href)
  283. // window.location.replace(href) // 此代码会有重复进入的bug
  284. }
  285. }
  286. function toGG(url) {
  287. //创建ActiveXObject实例,只在IE下有效,才可以创建
  288. var objShell = new ActiveXObject("WScript.Shell");
  289. var x = getChromePath(objShell);
  290. if (!x) {
  291. alert("当前没有Chrome浏览器,请先安装Chrome浏览器");
  292. return
  293. }
  294. /*
  295. 命令参数说明
  296. cmd.exe /c dir 是执行完dir命令后关闭命令窗口。
  297. cmd.exe /k dir 是执行完dir命令后不关闭命令窗口。
  298. cmd.exe /c start dir 会打开一个新窗口后执行dir指令,原窗口会关闭。
  299. cmd.exe /k start dir 会打开一个新窗口后执行dir指令,原窗口不会关闭。
  300. 这里的dir是start chrome www.baidu.com//用谷歌浏览器打开百度
  301. */
  302. // console.log(url)
  303. // console.log(objShell)
  304. var path_chrome = '"C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"';
  305. objShell.Run(path_chrome + url, 0, false);
  306. // objShell.Run("cmd.exe /c start chrome " + url, 0, false);
  307. // console.log(':',objShell.Run("cmd.exe /c start chrome " + url, 0, false))
  308. }
  309. function getChromePath(objShell) {
  310. var regPath = ["HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
  311. "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
  312. "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
  313. "HKEY_CURRENT_USER\\Software\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
  314. "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\chrome.exe\\Path",
  315. "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe\\Path",
  316. ];
  317. // 判断是否安装谷歌浏览器
  318. for (var i = 0; i < regPath.length; i++) {
  319. try {
  320. var x = objShell.regRead(regPath[i]);
  321. if (x) {
  322. return x;
  323. }
  324. } catch (e) { }
  325. }
  326. return undefined;
  327. };
  328. // 2.
  329. // avueData()
  330. // function avueData() {
  331. // console.log(11123686)
  332. // if (window.ActiveXObject === undefined) {// 不是ie浏览器,可直接打开
  333. // window.open(href, '_blank');
  334. // } else {// 是ie浏览器,跳转打开chrome
  335. // var objShell = new ActiveXObject("WScript.Shell");
  336. // objShell.Run("cmd.exe /c start chrome " + href, 0, true);
  337. // }
  338. // }
  339. // 3.
  340. // var objShell = new ActiveXObject("WScript.Shell");
  341. // objShell.Run("cmd.exe /c start chrome http://192.168.31.43:3000", 0, true);
  342. // function redirectToGoogle() {
  343. // var userAgent = window.navigator.userAgent;
  344. // var isChrome = /Chrome/.test(userAgent);
  345. // var ipAddress = '192.168.31.43:3000'; // 获取用户的IP地址,这部分需要借助服务器端的技术实现
  346. // if (isChrome && ipAddress) {
  347. // var googleURL = 'https://www.google.com' + '?ip=' + ipAddress;
  348. // window.location.href = googleURL;
  349. // }
  350. // }
  351. // redirectToGoogle();
  352. </script> -->
  353. <script type="text/javascript">
  354. // 部署
  355. location.href("javascript:go_url('http://10.67.0.64:9988','');");
  356. // 本地测试
  357. // location.href("javascript:go_url('http://192.168.2.216:3000','');");
  358. //关闭IE浏览器
  359. window.opener = null;
  360. window.open('','_self')
  361. window.close();
  362. function go_chrome(url, usename){
  363. //判断浏览器是否支持ActiveX控件,
  364. if(!!window.ActiveXObject || "ActiveXObject" in window){
  365. var shell = new ActiveXObject("WScript.shell");
  366. //var path_chrome = 'C:/Program File (x86)/Google/chrome/Application/chrome.exe';
  367. //var path_chrome = 'C:/Documents and Settings/'+ username +'Local Settings/Application Data/Google/chrome/Application/chrome.exe';
  368. //var path_chrome = 'C:/Users/xinchserver/AppData/Local/Google/Chrome/Application/chrome.exe';
  369. // 部署
  370. var path_chrome = '"%USERPROFILE%/local Settings/Application Data/360Chrome/Chrome/Application/360chrome.exe"';
  371. // 本地测试
  372. // var path_chrome = '"C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"';
  373. var cmd_str = path_chrome + ' ' + url;
  374. //console.log(cmd_str);
  375. try{
  376. shell.run(path_chrome+url, 0, false);
  377. }catch(e){
  378. path_chrome = '"%LOCALAPPDATA%/360Chrome/Chrome/Application/360chrome.exe" ';
  379. // alert('请登陆工资系统');
  380. shell.run(path_chrome+url, 0, false);
  381. }
  382. //shell.run(cmd_str);
  383. //console.log(cmd_str);
  384. }else{
  385. alert('请打开浏览器的ActiveX控件支持');
  386. }
  387. }
  388. function go_url(url, username){
  389. //判断是否为IE浏览器
  390. //if(window.document.documentMode){
  391. //alert("IE");
  392. //}
  393. var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
  394. var isChrome = userAgent.indexOf('Chrome') > -1 && userAgent.indexOf("Safari") > -1; //判断是否为chrome浏览器
  395. if(!isChrome){
  396. go_chrome(url, username); //打开chrome浏览器
  397. }else{
  398. top.location = url; //本浏览器跳转链接
  399. }
  400. }
  401. </script>
  402. </html>