From e073364efd411952e0ad8b745e83193d3eef64df Mon Sep 17 00:00:00 2001 From: haozq <1611483981@qq.com> Date: Thu, 19 Dec 2024 15:50:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bns/js/system/IPUtils.js | 12 ++++-- bns/js/system/ajax_intercept.js | 3 ++ bns/js/video/video.js | 68 ++++++++++++++++----------------- 3 files changed, 44 insertions(+), 39 deletions(-) diff --git a/bns/js/system/IPUtils.js b/bns/js/system/IPUtils.js index b9cfb2a..61da18e 100644 --- a/bns/js/system/IPUtils.js +++ b/bns/js/system/IPUtils.js @@ -1,17 +1,21 @@ +//测试环境 +let dataUrl = "http://192.168.0.14:11122/basfs/"; +let login_url="http://192.168.0.14:21001/ahsfs/login.html"; + + //只允许包含静态资源-不包含方法 //系统请求路径 -let dataUrl = "http://127.0.0.1:18080/basfs/"; +//let dataUrl = "http://127.0.0.1:18080/basfs/"; //重定向登录页面 // let login_url="http://sgwpdm.ah.sgcc.com.cn/ahsfs/login.html"; -let login_url="http://127.0.0.1:8848/jjsp_web/login.html"; +//let login_url="http://127.0.0.1:8848/jjsp_web/login.html"; //重定向登录页面 let login_url_new = "http://sgwpdm.ah.sgcc.com.cn/ahsfs/logins.html"; //分析决策中心 let jj_jc_url = "http://sgwpdm.ah.sgcc.com.cn/ahsfs/youo/infrastructureControl/index.html";//决策中心系统 //文件映射路径 let photoUrl = dataUrl + "proteam/files/"; -//公钥 加密 + let public_key="042cf4c381639c786958bad738b67680e59903f41d36ab3cb93e10d64a7e371723e2ffbef9e203160aa3059ef4b5ebc55b963f0cb19c4209ac5cc763113f91ec77"; -//私钥(会删除)-解密 let private_key="00f5be01e779c233e47d3937b97358f4a175f53ff27559121750a3c8de1a1fbdb5"; //是否是本地 let isBd=false; \ No newline at end of file diff --git a/bns/js/system/ajax_intercept.js b/bns/js/system/ajax_intercept.js index d0b20e3..49b35f1 100644 --- a/bns/js/system/ajax_intercept.js +++ b/bns/js/system/ajax_intercept.js @@ -72,6 +72,9 @@ function modifyResponseData(responseData) { if(responseData.decrypt){ responseData = sm2Decrypt(responseData.data); }else{ + if(typeof(responseData.decrypt)=='undefined'){ + return responseData; + } if(typeof(responseData.data)=='undefined'){ return responseData; } diff --git a/bns/js/video/video.js b/bns/js/video/video.js index 592f364..c891442 100644 --- a/bns/js/video/video.js +++ b/bns/js/video/video.js @@ -174,33 +174,33 @@ function initTreeCity(keyWord) { keyWord: $('#keyWord').val() }; let url = dataUrl + 'proteam/pot/video/getMenuListCity'; - ajaxRequest(url, "POST", params, true, function () { - }, function (result) { - if (result.code === 200) { - calleArr(data.data); - let treeData = [{ - id: "top", - title: '球机  (在线:' + num + '  ' + " 不在线:" + '' + noNum + '  ' + " 总数:" + all + ')', - checkArr: "0", - parentId: "-1", - children: data.data, - iconClass: 'iconfont icon-shexiangtou', - spread: true, - }]; - dtree.reload(tree, { - data: treeData, - }); - } else if (result.code === 500) { - layer.alert(result.msg, { icon: 2 }) - } - }, function (xhr, status, error) { - errorFn(xhr, status, error) - }, null); - /* Ajax().post({ + // ajaxRequest(url, "POST", params, true, function () { + // }, function (result) { + // if (result.code === 200) { + // calleArr(data.data); + // let treeData = [{ + // id: "top", + // title: '球机  (在线:' + num + '  ' + " 不在线:" + '' + noNum + '  ' + " 总数:" + all + ')', + // checkArr: "0", + // parentId: "-1", + // children: data.data, + // iconClass: 'iconfont icon-shexiangtou', + // spread: true, + // }]; + // dtree.reload(tree, { + // data: treeData, + // }); + // } else if (result.code === 500) { + // layer.alert(result.msg, { icon: 2 }) + // } + // }, function (xhr, status, error) { + // errorFn(xhr, status, error) + // }, null); + console.log(122) + $.ajax({ + type:"POST", headers: { - "encrypt": sm3(JSON.stringify({ - keyWord: $('#keyWord').val() - })) + 'encryption':'encryption' }, url: dataUrl + 'proteam/pot/video/getMenuListCity', data: { @@ -221,7 +221,7 @@ function initTreeCity(keyWord) { data: treeData, }); } - }); */ + }); } @@ -231,11 +231,10 @@ function initTreeCity(keyWord) { * @param keyWord */ function initTreeSwCity(keyWord) { - Ajax().post({ + $.ajax({ + type:"POST", headers: { - "encrypt": sm3(JSON.stringify({ - keyWord: keyWord - })) + 'encryption':'encryption' }, url: dataUrl + 'proteam/pot/video/getMenuListSWCity', data: { @@ -262,11 +261,10 @@ function initTreeSwCity(keyWord) { * @param {Object} keyWord */ function initTreeRisk(keyWord) { - Ajax().post({ + $.ajax({ + type:"POST", headers: { - "encrypt": sm3(JSON.stringify({ - keyWord: keyWord - })) + 'encryption':'encryption' }, url: dataUrl + 'proteam/pot/video/getMenuListRisk', data: { From c536ddf00c5e433b8f32c3d78fa3cfc966fd3a54 Mon Sep 17 00:00:00 2001 From: haozq <1611483981@qq.com> Date: Thu, 19 Dec 2024 16:09:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=A1=E8=AE=A1=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bns/html/base/log/child/businessLog.html | 1 + bns/html/base/log/child/errLog.html | 2 +- bns/html/base/log/child/logAnalysis.html | 2 ++ bns/html/base/log/child/logCapacityConfiguration.html | 1 + bns/html/base/log/child/systemLog.html | 1 + bns/js/system/htmlpermission.js | 6 +++++- 6 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bns/html/base/log/child/businessLog.html b/bns/html/base/log/child/businessLog.html index ada743f..302da80 100644 --- a/bns/html/base/log/child/businessLog.html +++ b/bns/html/base/log/child/businessLog.html @@ -121,6 +121,7 @@ + diff --git a/bns/html/base/log/child/errLog.html b/bns/html/base/log/child/errLog.html index 96f9284..cb9d876 100644 --- a/bns/html/base/log/child/errLog.html +++ b/bns/html/base/log/child/errLog.html @@ -16,7 +16,7 @@ - + diff --git a/bns/html/base/log/child/logAnalysis.html b/bns/html/base/log/child/logAnalysis.html index e4ddbaf..0c392ca 100644 --- a/bns/html/base/log/child/logAnalysis.html +++ b/bns/html/base/log/child/logAnalysis.html @@ -9,6 +9,7 @@ + @@ -70,6 +71,7 @@ + diff --git a/bns/html/base/log/child/logCapacityConfiguration.html b/bns/html/base/log/child/logCapacityConfiguration.html index eda8767..a4648e8 100644 --- a/bns/html/base/log/child/logCapacityConfiguration.html +++ b/bns/html/base/log/child/logCapacityConfiguration.html @@ -37,6 +37,7 @@ + diff --git a/bns/html/base/log/child/systemLog.html b/bns/html/base/log/child/systemLog.html index a3fbc77..2b3c0cc 100644 --- a/bns/html/base/log/child/systemLog.html +++ b/bns/html/base/log/child/systemLog.html @@ -16,6 +16,7 @@ + diff --git a/bns/js/system/htmlpermission.js b/bns/js/system/htmlpermission.js index 082dd2f..b5c3b9d 100644 --- a/bns/js/system/htmlpermission.js +++ b/bns/js/system/htmlpermission.js @@ -1,12 +1,16 @@ +let sjurl=['/base/log/child/systemLog.html','/base/log/child/businessLog.html','/base/log/child/errLog.html','/base/log/child/logAnalysis.html','/base/log/child/logCapacityConfiguration.html'] getLocalpath(); - function getLocalpath(){ var currentPath = window.location.pathname; var url=currentPath.split("/html"); let usJosn=JSON.parse(us); + if(sjurl.includes(url[1])){ + url[1]='/base/log/logManage.html'; + } let yq=getHtmlPermission(usJosn.menus,url[1]); console.log(yq) if(!yq){ + addLogs(url,url[1],usJosn.nickName); top.window.location.href = login_url; }