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] =?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: {