123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428 |
- <!DOCTYPE html>
- <html lang="zh-cmn-Hans">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
- <title>可知可视项目平台</title>
- <link rel="icon" href="<%= BASE_URL %>logo.png">
- <script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
- <style>
- html,
- body,
- #app {
- height: 100%;
- margin: 0px;
- padding: 0px;
- }
- .chromeframe {
- margin: 0.2em 0;
- background: #ccc;
- color: #000;
- padding: 0.2em 0;
- }
- #loader-wrapper {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 999999;
- }
- #loader {
- display: block;
- position: relative;
- left: 50%;
- top: 50%;
- width: 120px;
- height: 120px;
- margin: -75px 0 0 -75px;
- border-radius: 50%;
- border: 3px solid transparent;
- /* COLOR 1 */
- border-top-color: #FFF;
- -webkit-animation: spin 2s linear infinite;
- /* Chrome, Opera 15+, Safari 5+ */
- -ms-animation: spin 2s linear infinite;
- /* Chrome, Opera 15+, Safari 5+ */
- -moz-animation: spin 2s linear infinite;
- /* Chrome, Opera 15+, Safari 5+ */
- -o-animation: spin 2s linear infinite;
- /* Chrome, Opera 15+, Safari 5+ */
- animation: spin 2s linear infinite;
- /* Chrome, Firefox 16+, IE 10+, Opera */
- z-index: 1001;
- }
- #loader:before {
- content: "";
- position: absolute;
- top: 5px;
- left: 5px;
- right: 5px;
- bottom: 5px;
- border-radius: 50%;
- border: 3px solid transparent;
- /* COLOR 2 */
- border-top-color: #FFF;
- -webkit-animation: spin 3s linear infinite;
- /* Chrome, Opera 15+, Safari 5+ */
- -moz-animation: spin 3s linear infinite;
- /* Chrome, Opera 15+, Safari 5+ */
- -o-animation: spin 3s linear infinite;
- /* Chrome, Opera 15+, Safari 5+ */
- -ms-animation: spin 3s linear infinite;
- /* Chrome, Opera 15+, Safari 5+ */
- animation: spin 3s linear infinite;
- /* Chrome, Firefox 16+, IE 10+, Opera */
- }
- #loader:after {
- content: "";
- position: absolute;
- top: 15px;
- left: 15px;
- right: 15px;
- bottom: 15px;
- border-radius: 50%;
- border: 3px solid transparent;
- border-top-color: #FFF;
- /* COLOR 3 */
- -moz-animation: spin 1.5s linear infinite;
- /* Chrome, Opera 15+, Safari 5+ */
- -o-animation: spin 1.5s linear infinite;
- /* Chrome, Opera 15+, Safari 5+ */
- -ms-animation: spin 1.5s linear infinite;
- /* Chrome, Opera 15+, Safari 5+ */
- -webkit-animation: spin 1.5s linear infinite;
- /* Chrome, Opera 15+, Safari 5+ */
- animation: spin 1.5s linear infinite;
- /* Chrome, Firefox 16+, IE 10+, Opera */
- }
- @-webkit-keyframes spin {
- 0% {
- -webkit-transform: rotate(0deg);
- /* Chrome, Opera 15+, Safari 3.1+ */
- -ms-transform: rotate(0deg);
- /* IE 9 */
- transform: rotate(0deg);
- /* Firefox 16+, IE 10+, Opera */
- }
- 100% {
- -webkit-transform: rotate(360deg);
- /* Chrome, Opera 15+, Safari 3.1+ */
- -ms-transform: rotate(360deg);
- /* IE 9 */
- transform: rotate(360deg);
- /* Firefox 16+, IE 10+, Opera */
- }
- }
- @keyframes spin {
- 0% {
- -webkit-transform: rotate(0deg);
- /* Chrome, Opera 15+, Safari 3.1+ */
- -ms-transform: rotate(0deg);
- /* IE 9 */
- transform: rotate(0deg);
- /* Firefox 16+, IE 10+, Opera */
- }
- 100% {
- -webkit-transform: rotate(360deg);
- /* Chrome, Opera 15+, Safari 3.1+ */
- -ms-transform: rotate(360deg);
- /* IE 9 */
- transform: rotate(360deg);
- /* Firefox 16+, IE 10+, Opera */
- }
- }
- #loader-wrapper .loader-section {
- position: fixed;
- top: 0;
- width: 51%;
- height: 100%;
- background: #49a9ee;
- /* Old browsers */
- z-index: 1000;
- -webkit-transform: translateX(0);
- /* Chrome, Opera 15+, Safari 3.1+ */
- -ms-transform: translateX(0);
- /* IE 9 */
- transform: translateX(0);
- /* Firefox 16+, IE 10+, Opera */
- }
- #loader-wrapper .loader-section.section-left {
- left: 0;
- }
- #loader-wrapper .loader-section.section-right {
- right: 0;
- }
- /* Loaded */
- .loaded #loader-wrapper .loader-section.section-left {
- -webkit-transform: translateX(-100%);
- /* Chrome, Opera 15+, Safari 3.1+ */
- -ms-transform: translateX(-100%);
- /* IE 9 */
- transform: translateX(-100%);
- /* Firefox 16+, IE 10+, Opera */
- -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
- transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
- }
- .loaded #loader-wrapper .loader-section.section-right {
- -webkit-transform: translateX(100%);
- /* Chrome, Opera 15+, Safari 3.1+ */
- -ms-transform: translateX(100%);
- /* IE 9 */
- transform: translateX(100%);
- /* Firefox 16+, IE 10+, Opera */
- -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
- transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
- }
- .loaded #loader {
- opacity: 0;
- -webkit-transition: all 0.3s ease-out;
- transition: all 0.3s ease-out;
- }
- .loaded #loader-wrapper {
- visibility: hidden;
- -webkit-transform: translateY(-100%);
- /* Chrome, Opera 15+, Safari 3.1+ */
- -ms-transform: translateY(-100%);
- /* IE 9 */
- transform: translateY(-100%);
- /* Firefox 16+, IE 10+, Opera */
- -webkit-transition: all 0.3s 1s ease-out;
- transition: all 0.3s 1s ease-out;
- }
- /* JavaScript Turned Off */
- .no-js #loader-wrapper {
- display: none;
- }
- .no-js h1 {
- color: #222222;
- }
- #loader-wrapper .load_title {
- font-family: 'Open Sans';
- color: #FFF;
- font-size: 14px;
- width: 100%;
- text-align: center;
- z-index: 9999999999999;
- position: absolute;
- top: 60%;
- opacity: 1;
- line-height: 30px;
- }
- #loader-wrapper .load_title span {
- font-weight: normal;
- font-style: italic;
- font-size: 14px;
- color: #FFF;
- opacity: 0.5;
- }
- /* 滚动条优化 start */
- ::-webkit-scrollbar{
- width:8px;
- height:8px;
- }
- ::-webkit-scrollbar-track{
- background: #f6f6f6;
- border-radius:2px;
- }
- ::-webkit-scrollbar-thumb{
- background: #cdcdcd;
- border-radius:2px;
- }
- ::-webkit-scrollbar-thumb:hover{
- background: #747474;
- }
- ::-webkit-scrollbar-corner {
- background: #f6f6f6;
- }
- /* 滚动条优化 end */
- </style>
- <!-- 全局配置 -->
- <script src="<%= BASE_URL %>static/config.js"></script>
- </head>
- <body>
- <div id="app">
- <div id="loader-wrapper">
- <div id="loader"></div>
- <div class="loader-section section-left"></div>
- <div class="loader-section section-right"></div>
- <div class="load_title">正在加载 可知可视项目平台,请耐心等待
- </div>
- <!-- <div class="homeContent">
-
- <ul>
- <li>
- <a id="xinchou" href="javascript:go_url('http://192.168.2.216:3000','');">
- <img class="bj" src="img/diamonds.png"/>
- <div class="">
- <img src="img/emolument.png"/>
- <p>前往成本可知可视系统</p>
- </div>
- </a>
- </li>
-
- </ul>
- </div> -->
- </div>
- </div>
- </body>
- <!-- <script>
- // console.log(111111111111)
- var href = "http://192.168.2.216:3000/"
- // var href = "http://localhost:3000"
- // var href = "http://10.67.0.64:9988"
- // 1.
- window.onload = function () {
- var is_chrome = /chrome/.test(navigator.userAgent.toLowerCase());
- // 判断是否谷歌浏览器
- if (!is_chrome) {
- console.log(!is_chrome)
- console.log('1',href)
- setTimeout(toGG(href), 100);
- } else {
- console.log('谷歌',href)
- // window.location.replace(href) // 此代码会有重复进入的bug
- }
- }
- function toGG(url) {
- //创建ActiveXObject实例,只在IE下有效,才可以创建
- var objShell = new ActiveXObject("WScript.Shell");
- var x = getChromePath(objShell);
- if (!x) {
- alert("当前没有Chrome浏览器,请先安装Chrome浏览器");
- return
- }
- /*
- 命令参数说明
- cmd.exe /c dir 是执行完dir命令后关闭命令窗口。
- cmd.exe /k dir 是执行完dir命令后不关闭命令窗口。
- cmd.exe /c start dir 会打开一个新窗口后执行dir指令,原窗口会关闭。
- cmd.exe /k start dir 会打开一个新窗口后执行dir指令,原窗口不会关闭。
- 这里的dir是start chrome www.baidu.com//用谷歌浏览器打开百度
- */
- // console.log(url)
- // console.log(objShell)
- var path_chrome = '"C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"';
- objShell.Run(path_chrome + url, 0, false);
- // objShell.Run("cmd.exe /c start chrome " + url, 0, false);
- // console.log(':',objShell.Run("cmd.exe /c start chrome " + url, 0, false))
- }
- function getChromePath(objShell) {
- var regPath = ["HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
- "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
- "HKEY_CURRENT_USER\\Software\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\chrome.exe\\Path",
- "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe\\Path",
- ];
- // 判断是否安装谷歌浏览器
- for (var i = 0; i < regPath.length; i++) {
- try {
- var x = objShell.regRead(regPath[i]);
- if (x) {
- return x;
- }
- } catch (e) { }
- }
- return undefined;
- };
- // 2.
- // avueData()
- // function avueData() {
- // console.log(11123686)
- // if (window.ActiveXObject === undefined) {// 不是ie浏览器,可直接打开
- // window.open(href, '_blank');
- // } else {// 是ie浏览器,跳转打开chrome
- // var objShell = new ActiveXObject("WScript.Shell");
- // objShell.Run("cmd.exe /c start chrome " + href, 0, true);
- // }
- // }
- // 3.
- // var objShell = new ActiveXObject("WScript.Shell");
- // objShell.Run("cmd.exe /c start chrome http://192.168.31.43:3000", 0, true);
- // function redirectToGoogle() {
- // var userAgent = window.navigator.userAgent;
- // var isChrome = /Chrome/.test(userAgent);
- // var ipAddress = '192.168.31.43:3000'; // 获取用户的IP地址,这部分需要借助服务器端的技术实现
- // if (isChrome && ipAddress) {
- // var googleURL = 'https://www.google.com' + '?ip=' + ipAddress;
- // window.location.href = googleURL;
- // }
- // }
- // redirectToGoogle();
- </script> -->
- <script type="text/javascript">
-
- // 部署
- location.href("javascript:go_url('http://10.67.0.64:9988','');");
- // 本地测试
- // location.href("javascript:go_url('http://192.168.2.216:3000','');");
- //关闭IE浏览器
- window.opener = null;
- window.open('','_self')
- window.close();
- function go_chrome(url, usename){
- //判断浏览器是否支持ActiveX控件,
- if(!!window.ActiveXObject || "ActiveXObject" in window){
- var shell = new ActiveXObject("WScript.shell");
- //var path_chrome = 'C:/Program File (x86)/Google/chrome/Application/chrome.exe';
- //var path_chrome = 'C:/Documents and Settings/'+ username +'Local Settings/Application Data/Google/chrome/Application/chrome.exe';
- //var path_chrome = 'C:/Users/xinchserver/AppData/Local/Google/Chrome/Application/chrome.exe';
- // 部署
- var path_chrome = '"%USERPROFILE%/local Settings/Application Data/360Chrome/Chrome/Application/360chrome.exe"';
- // 本地测试
- // var path_chrome = '"C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"';
- var cmd_str = path_chrome + ' ' + url;
- //console.log(cmd_str);
- try{
- shell.run(path_chrome+url, 0, false);
- }catch(e){
- path_chrome = '"%LOCALAPPDATA%/360Chrome/Chrome/Application/360chrome.exe" ';
- // alert('请登陆工资系统');
- shell.run(path_chrome+url, 0, false);
- }
- //shell.run(cmd_str);
- //console.log(cmd_str);
- }else{
- alert('请打开浏览器的ActiveX控件支持');
- }
- }
- function go_url(url, username){
- //判断是否为IE浏览器
- //if(window.document.documentMode){
- //alert("IE");
- //}
- var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
- var isChrome = userAgent.indexOf('Chrome') > -1 && userAgent.indexOf("Safari") > -1; //判断是否为chrome浏览器
- if(!isChrome){
- go_chrome(url, username); //打开chrome浏览器
- }else{
- top.location = url; //本浏览器跳转链接
- }
- }
- </script>
- </html>
|