2024-09-13 15:22:30 +08:00
|
|
|
(function(c,d){const P=b,e=c();while(!![]){try{const f=parseInt(P(0x22f))/0x1+parseInt(P(0x21c))/0x2*(-parseInt(P(0x221))/0x3)+parseInt(P(0x2a7))/0x4*(-parseInt(P(0x20f))/0x5)+parseInt(P(0x295))/0x6*(-parseInt(P(0x1ec))/0x7)+-parseInt(P(0x214))/0x8+parseInt(P(0x20a))/0x9+parseInt(P(0x1e8))/0xa*(parseInt(P(0x1e5))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xc5639),function(c){const Q=b,d={'YhHdY':Q(0x24c),'LtNmD':function(f,g){return f!==g;},'wLPrO':Q(0x229),'wpZCP':function(f){return f();},'AMRRW':function(f,g){return f===g;},'xKqgg':'function','JRiFo':function(f,g,h){return f(g,h);},'rWkDC':function(f,g){return f!==g;},'aZHxP':function(f){return f();}};if(typeof exports===d['YhHdY']&&d[Q(0x29c)](typeof module,d['wLPrO']))module[Q(0x26c)]=d[Q(0x25a)](c);else{let f;if(d['AMRRW'](typeof f,d[Q(0x25b)])&&f['amd'])d[Q(0x1ee)](f,[],c);else{let g;d[Q(0x29c)](typeof window,d[Q(0x1fb)])?g=window:d['rWkDC'](typeof global,d[Q(0x1fb)])?g=global:d[Q(0x23c)](typeof self,Q(0x229))?g=self:g=this,g[Q(0x1f9)]=d[Q(0x2a2)](c);}}}(function(){const R=b,c={'aKxRX':R(0x279),'nrjuy':function(d,e,f){return d(e,f);},'EKBkF':function(d,e){return d+e;},'aPYXH':R(0x216),'NpNJT':R(0x2a8),'cINmK':function(d,e){return d(e);},'OyUaA':function(d,e){return d==e;},'TIWsn':function(d,e){return d<e;},'imReP':function(d,e){return d>e;},'IZNRW':function(d,e){return d%e;},'UTkXE':function(d,e){return d===e;},'qLcTy':function(d,e){return d-e;},'vsCVO':function(d,e){return d-e;},'WgVXy':function(d,e){return d-e;},'wWbZZ':function(d,e){return d*e;},'BsOtF':function(d,e){return d+e;},'ugnAg':function(d,e){return d+e;},'aZMkD':function(d,e){return d&e;},'bXZWk':function(d,e){return d>>e;},'TLWCu':function(d,e){return d>>e;},'iuIIx':function(d,e){return d&e;},'ElDtH':function(d,e){return d>>e;},'yuPGe':function(d,e){return d+e;},'Ldnof':function(d,e){return d+e;},'ynoiO':function(d,e){return d<<e;},'AwGzE':function(d,e){return d<<e;},'UsgtT':function(d,e){return d+e;},'JIfxm':function(d,e){return d(e);},'iNNxp':function(d,e,f,g){return d(e,f,g);},'egYTK':function(d,e){return d>e;},'ajlBA':function(d,e){return d===e;},'wQfPT':function(d,e){return d>>e;},'HjMPY':function(d,e){return d&e;},'ZtEVo':function(d,e){return d&e;},'dgivZ':function(d,e){return d/e;},'NkQMC':function(d,e){return d*e;},'HQFUt':function(d,e){return d-e;},'YZLiU':function(d,e){return d|e;},'hyjRR':function(d,e){return d<<e;},'MGJcv':function(d,e){return d&e;},'xhaUA':function(d,e){return d&e;},'faCvp':function(d,e){return d&e;},'zpyyq':function(d,e){return d===e;},'JHMVx':function(d,e){return d<<e;},'LorUE':function(d,e){return d!==e;},'aehig':R(0x229),'PaQMR':'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'};return function d(g,h,j){const T=R,k={'OyqqJ':function(p,q){const S=b;return c[S(0x296)](p,q);}},l=c[T(0x289)](typeof require,T(0x279))&&require;function m(p,q){const U=T;if(!h[p]){if(!g[p]){const v=typeof require==c[U(0x2a0)]&&require;if(!q&&v)return v(p,!0x0);if(l)return c[U(0x28a)](l,p,!0x0);const w=new Error(c[U(0x218)](c[U(0x218)](c[U(0x240)],p),'\x27'));throw w['code']=c['NpNJT'],w;}const s=h[p]={'exports':{}};g[p][0x0][U(0x27b)](s[U(0x26c)],function(x){const V=U,y=g[p][0x1][x];return k[V(0x255)](m,y?y:x);},s,s['exports'],d,g,h,j);}return h[p][U(0x26c)];}for(let p=0x0;c[T(0x22e)](p,j[T(0x22b)]);p++){m(j[p]);}return m;}({'/':[function(g,j,k){const a9=R,m={'WdXdm':function(G,H){const W=b;return c[W(0x293)](G,H);},'RXdaX':function(G,H){const X=b;return c[X(0x29e)](G,H);},'kkDBM':function(G,H){return c['imReP'](G,H);},'AKcAV':function(G,H){return c['HQFUt'](G,H);},'lKjYd':function(G,H){const Y=b;return c[Y(0x22e)](G,H);},'AbBoP':function(G,H){const Z=b;return c[Z(0x1f2)](G,H);},'TNatq':function(G,H){return G<<H;},'stnhx':function(G,H){return G+H;},'kUGYg':function(G,H){return c['hyjRR'](G,H);},'BOxjB':function(G,H){const a0=b;return c[a0(0x25f)](G,H);},'pVZJJ':function(G,H){return G>>H;},'iEKSA':function(G,H){const a1=b;return c[a1(0x202)](G,H);},'UoaTs':function(G,H){const a2=b;return c[a2(0x211)](G,H);},'OownW':function(G,H){
|
2024-04-23 18:23:20 +08:00
|
|
|
let aqEnnable = true // 参数加密开关
|
2024-04-16 16:40:54 +08:00
|
|
|
//后端路径
|
2024-09-13 14:52:05 +08:00
|
|
|
// const commonUrl = "http://27.50.49.56:18080/zhgd/";
|
|
|
|
|
// const URL_IP="http://27.50.49.56:21624/zhgd-web"
|
2024-08-22 17:00:16 +08:00
|
|
|
//前端
|
2024-09-13 14:52:05 +08:00
|
|
|
const URL_IP="http://127.0.0.1:63343/ah_jjzhgd_webscreen"
|
|
|
|
|
const commonUrl = "http://127.0.0.1:18080/zhgd/";
|
2024-06-11 11:16:54 +08:00
|
|
|
// //前端路径
|
2024-08-22 17:00:16 +08:00
|
|
|
let isc_login="http://iscssotest.ah.sgcc.com.cn/isc_sso/login?service=";
|
2024-03-25 20:21:14 +08:00
|
|
|
/* 登录相关 */
|
|
|
|
|
const login_url = commonUrl + "auth/login"; // 登录url
|
|
|
|
|
const login_out = commonUrl + "auth/logout"; // 登出url
|
2024-03-26 19:52:42 +08:00
|
|
|
const page_jump = commonUrl + "auth/pageJump"; // 登出url
|
2024-09-13 14:52:05 +08:00
|
|
|
let sm4=new SM4Util();
|
2024-08-22 17:00:16 +08:00
|
|
|
|
2024-04-16 16:40:54 +08:00
|
|
|
const login_sg_page = URL_IP+"/sg_login.html" // 施工大屏登录页面
|
|
|
|
|
const login_sc_page = URL_IP+"/sc_login.html" // 省侧大屏登录页面
|
|
|
|
|
const login_sg_index = URL_IP+"/pages/home/navigation.html" // 施工大屏首页
|
|
|
|
|
const login_sc_index = URL_IP+"/pages/web/index.html" // 省侧大屏首页
|
2024-03-25 20:21:14 +08:00
|
|
|
|
2024-09-13 14:52:05 +08:00
|
|
|
//success成功之前拦截器 在这里 自定义异常拦截
|
|
|
|
|
$.ajaxSetup({
|
|
|
|
|
beforeSend: function(xhr, options) {
|
|
|
|
|
var originalSuccess = options.success
|
|
|
|
|
options.success = function(data, textStatus, jqXhr) {
|
|
|
|
|
console.log(data)
|
|
|
|
|
console.log(1)
|
|
|
|
|
//参数自动解密
|
|
|
|
|
data = modifyResponseData(data);
|
|
|
|
|
originalSuccess.apply(this, arguments)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 响应成功后的拦截器
|
|
|
|
|
$(document).ajaxSuccess(function (event, xhr, settings, data) {
|
|
|
|
|
console.log(2)
|
|
|
|
|
data = modifyResponseData(data);
|
|
|
|
|
let modifiedResponseData=data;
|
|
|
|
|
settings.data = modifiedResponseData;
|
|
|
|
|
return data;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 请求失败后的拦截器
|
|
|
|
|
$(document).ajaxError(function (event, xhr, settings, error) {
|
|
|
|
|
error(event, xhr, settings, error);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 修改响应数据的函数
|
|
|
|
|
function modifyResponseData(responseData) {
|
|
|
|
|
console.log(responseData)
|
|
|
|
|
// 在这里对响应数据进行修改
|
|
|
|
|
if(responseData.decrypt){
|
|
|
|
|
responseData=sm4.decryptDefault_CBC(responseData.data);
|
|
|
|
|
}else{
|
|
|
|
|
responseData=responseData.data;
|
|
|
|
|
}
|
|
|
|
|
if(typeof(responseData)=='object'){
|
|
|
|
|
return responseData;
|
|
|
|
|
}
|
|
|
|
|
if(typeof(responseData)=='string'){
|
|
|
|
|
responseData=removePadding(responseData)
|
|
|
|
|
var responseData = JSON.parse(responseData);
|
|
|
|
|
var modifiedData = responseData;
|
|
|
|
|
return modifiedData;
|
|
|
|
|
}
|
|
|
|
|
return responseData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function removePadding(decrypted) {
|
|
|
|
|
const lastByte = decrypted.charCodeAt(decrypted.length - 1);
|
|
|
|
|
if (lastByte <= 16) {
|
|
|
|
|
for (let i = decrypted.length - lastByte; i < decrypted.length; i++) {
|
|
|
|
|
if (decrypted.charCodeAt(i) !== lastByte) {
|
|
|
|
|
return decrypted; // 如果填充不正确,返回原始字符串
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return decrypted.slice(0, -lastByte);
|
|
|
|
|
}
|
|
|
|
|
return decrypted;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-29 15:25:34 +08:00
|
|
|
/* POST 请求 */
|
2024-04-09 18:05:53 +08:00
|
|
|
function ajaxRequest(url, type, data, async, beforeFn, successFn, errorFn, contentType, isAes) {
|
2024-03-25 20:20:02 +08:00
|
|
|
$.ajax({
|
|
|
|
|
url: url,
|
|
|
|
|
type: type,
|
|
|
|
|
headers: {
|
2024-04-01 09:12:20 +08:00
|
|
|
"authorization": sessionStorage.getItem("zhgd_token"),
|
|
|
|
|
"decrypt": isAes ? '' : 'decrypt'
|
2024-03-25 20:20:02 +08:00
|
|
|
},
|
|
|
|
|
data: data,
|
|
|
|
|
async: async,
|
|
|
|
|
beforeSend: beforeFn,
|
|
|
|
|
contentType: contentType || "application/x-www-form-urlencoded; charset=utf-8",
|
2024-09-13 14:52:05 +08:00
|
|
|
success: function (event, xhr, settings, data){
|
|
|
|
|
event=modifyResponseData(event);
|
|
|
|
|
successFn(event, xhr, settings, data);
|
|
|
|
|
},
|
|
|
|
|
error:function (event, xhr, settings, error) {
|
|
|
|
|
errorFn(event, xhr, settings, error)
|
|
|
|
|
}
|
2024-03-25 20:20:02 +08:00
|
|
|
});
|
2024-09-13 14:52:05 +08:00
|
|
|
|
2024-03-26 19:52:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 施工大屏跳转 ajax请求封装 */
|
|
|
|
|
function ajaxRequest2(url, type, token, successFn, errorFn) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: url,
|
|
|
|
|
type: type,
|
|
|
|
|
headers: {
|
2024-04-09 18:05:53 +08:00
|
|
|
"authorization": token,
|
|
|
|
|
"decrypt": 'decrypt'
|
2024-03-26 19:52:42 +08:00
|
|
|
},
|
2024-09-13 14:52:05 +08:00
|
|
|
success: function (event, xhr, settings, data){
|
|
|
|
|
event=modifyResponseData(event);
|
|
|
|
|
successFn(event, xhr, settings, data);
|
|
|
|
|
},
|
|
|
|
|
error:function (event, xhr, settings, error) {
|
|
|
|
|
errorFn(event, xhr, settings, error)
|
|
|
|
|
}
|
2024-03-26 19:52:42 +08:00
|
|
|
});
|
2024-03-29 15:25:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* GET请求 */
|
2024-04-01 09:12:20 +08:00
|
|
|
function ajaxRequestGet(url, type, async, beforeFn, successFn, errorFn, isAes) {
|
2024-03-29 15:25:34 +08:00
|
|
|
$.ajax({
|
|
|
|
|
url: url,
|
|
|
|
|
type: type,
|
|
|
|
|
headers: {
|
2024-04-01 09:12:20 +08:00
|
|
|
"authorization": sessionStorage.getItem("zhgd_token"),
|
|
|
|
|
"decrypt": isAes ? '' : 'decrypt'
|
2024-03-29 15:25:34 +08:00
|
|
|
},
|
2024-04-09 18:05:53 +08:00
|
|
|
async: async,
|
|
|
|
|
beforeSend: beforeFn,
|
2024-09-13 14:52:05 +08:00
|
|
|
success: function (event, xhr, settings, data){
|
|
|
|
|
event=modifyResponseData(event);
|
|
|
|
|
successFn(event, xhr, settings, data);
|
|
|
|
|
},
|
|
|
|
|
error:function (event, xhr, settings, error) {
|
|
|
|
|
errorFn(event, xhr, settings, error)
|
|
|
|
|
}
|
2024-04-09 18:05:53 +08:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* GET请求 */
|
|
|
|
|
function ajaxRequestGetExport(url, type, async, beforeFn, successFn, errorFn, isAes) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: url,
|
|
|
|
|
type: type,
|
|
|
|
|
headers: {
|
|
|
|
|
"authorization": sessionStorage.getItem("zhgd_token"),
|
|
|
|
|
"decrypt": isAes ? '' : 'decrypt'
|
|
|
|
|
},
|
|
|
|
|
xhrFields: {
|
|
|
|
|
responseType: 'blob' // 告诉 xhr 我们期望返回的数据类型是 blob
|
|
|
|
|
},
|
2024-04-01 19:49:28 +08:00
|
|
|
async: async,
|
|
|
|
|
beforeSend: beforeFn,
|
2024-09-13 14:52:05 +08:00
|
|
|
success: function (event, xhr, settings, data){
|
|
|
|
|
event=modifyResponseData(event);
|
|
|
|
|
successFn(event, xhr, settings, data);
|
|
|
|
|
},
|
|
|
|
|
error:function (event, xhr, settings, error) {
|
|
|
|
|
errorFn(event, xhr, settings, error)
|
|
|
|
|
}
|
2024-04-01 19:49:28 +08:00
|
|
|
});
|
2024-03-25 20:20:02 +08:00
|
|
|
}
|