let aqEnnable = true // 参数加密开关 //后端路径 const commonUrl = "http://36.33.26.201:19090/zhgd/"; //前端路径 const URL_IP="http://36.33.26.201:21624/zhgd-web" // const commonUrl = "http://127.0.0.1:18080/zhgd/"; // //前端路径 // const URL_IP="http://10.138.225.233:21624/zhgd-web" /* 登录相关 */ const login_url = commonUrl + "auth/login"; // 登录url const login_out = commonUrl + "auth/logout"; // 登出url const page_jump = commonUrl + "auth/pageJump"; // 登出url 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" // 省侧大屏首页 /* POST 请求 */ function ajaxRequest(url, type, data, async, beforeFn, successFn, errorFn, contentType, isAes) { $.ajax({ url: url, type: type, headers: { "authorization": sessionStorage.getItem("zhgd_token"), "decrypt": isAes ? '' : 'decrypt' }, data: data, async: async, beforeSend: beforeFn, contentType: contentType || "application/x-www-form-urlencoded; charset=utf-8", success: successFn, error: errorFn }); } /* 施工大屏跳转 ajax请求封装 */ function ajaxRequest2(url, type, token, successFn, errorFn) { $.ajax({ url: url, type: type, headers: { "authorization": token, "decrypt": 'decrypt' }, success: successFn, error: errorFn }); } /* GET请求 */ function ajaxRequestGet(url, type, async, beforeFn, successFn, errorFn, isAes) { $.ajax({ url: url, type: type, headers: { "authorization": sessionStorage.getItem("zhgd_token"), "decrypt": isAes ? '' : 'decrypt' }, async: async, beforeSend: beforeFn, success: successFn, error: errorFn }); } /* 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 }, async: async, beforeSend: beforeFn, success: successFn, error: errorFn }); }