diff --git a/index.html b/index.html index 5d7fdaf..d07b18b 100644 --- a/index.html +++ b/index.html @@ -163,7 +163,6 @@ window.history.pushState({}, 0, url); } initPage(miniAdmin); - sessionStorage.setItem('us', JSON.stringify(result.data)); } else if (result.code === 401) { closeWindowOpen(); } @@ -172,8 +171,8 @@ }, null); } else { console.log('走的自己登录'); - // login(miniAdmin); - window.location = 'page/401.html'; + login(miniAdmin); + // window.location = 'page/401.html'; } /* var options = { iniUrl: "api/init.json", // 初始化接口 @@ -225,9 +224,10 @@ // 登录获取token let login_url = dataUrl + 'login/userLogin' const params = { - "username": 'sa', - // "password": '3NBzZK7qxhMhrmvi63FnuQ==', - "password": 'ebbd6ea34bbab2b0813afcf59c8c9556', + // "username": 'sa', + // "password": 'ebbd6ea34bbab2b0813afcf59c8c9556', + "username": 'bns', + "password": '1769fb2837e10e9d22c1c25add76355a', } ajaxRequest(login_url, "POST", params, true, function () { }, function (result) { @@ -246,4 +246,4 @@ - \ No newline at end of file + diff --git a/js/public.js b/js/public.js index f66f3b6..770e3c4 100644 --- a/js/public.js +++ b/js/public.js @@ -1,11 +1,11 @@ -const dataUrl = 'http://127.0.0.1:21522/gz_car/'; // 数据请求路径 -const fileUrl = 'http://127.0.0.1:21522/gz_car/statics'; // 文件路径 -const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 +// const dataUrl = 'http://127.0.0.1:21522/gz_car/'; // 数据请求路径 +// const fileUrl = 'http://127.0.0.1:21522/gz_car/statics'; // 文件路径 +// const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 -/* const dataUrl = 'http://192.168.0.14:21999/'; // 数据请求路径 -const fileUrl = 'http://192.168.0.14:21999/statics'; // 文件路径 +const dataUrl = 'http://192.168.0.16:21522/gz-car/'; // 数据请求路径 +const fileUrl = 'http://192.168.0.16:21522/gz-car/statics'; // 文件路径 const signFileUrl = 'http://127.0.0.1:21995/statics'; // 签名文件路径 -const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 */ +const viewFileUrl = 'http://192.168.0.14:8012/onlinePreview?url=' //14服务器预览文件 /* 请求 */ function ajaxRequest(url, type, data, async, beforeFn, successFn, errorFn, contentType) { @@ -231,7 +231,7 @@ function getUrlParam(key) { // 预览文件 function commonViewFile(params) { let path = fileUrl + params + '?auth=' + sessionStorage.getItem("gz-token"); - // path = fileUrl + params + // path = fileUrl + params console.log(path); let encodePath = encodeURIComponent(useBase64.encode64(path)); window.open(viewFileUrl + encodePath + '&token=' + generateToken()); @@ -544,4 +544,4 @@ function numToChinese(num) { } else if (num === 36) { return '三十六'; } -} \ No newline at end of file +}