2024-03-26 13:35:59 +08:00
|
|
|
const aqEnnable = false;// 参数加密开关
|
2024-03-25 20:21:14 +08:00
|
|
|
const commonUrl = "http://10.40.92.33:18080/zhgd/";
|
|
|
|
|
/* 登录相关 */
|
|
|
|
|
const login_url = commonUrl + "auth/login"; // 登录url
|
|
|
|
|
const login_out = commonUrl + "auth/logout"; // 登出url
|
|
|
|
|
const login_page = "http://127.0.0.1:8100/login.html" // 登录页面
|
|
|
|
|
|
2024-03-25 20:20:02 +08:00
|
|
|
// ajax 请求封装
|
|
|
|
|
function ajaxRequest(url, type, data, async, beforeFn, successFn, errorFn, contentType) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: url,
|
|
|
|
|
type: type,
|
|
|
|
|
headers: {
|
|
|
|
|
"authorization": localStorage.getItem("zhgd_token")
|
|
|
|
|
},
|
|
|
|
|
data: data,
|
|
|
|
|
async: async,
|
|
|
|
|
beforeSend: beforeFn,
|
|
|
|
|
contentType: contentType || "application/x-www-form-urlencoded; charset=utf-8",
|
|
|
|
|
success: successFn,
|
|
|
|
|
error: errorFn
|
|
|
|
|
});
|
|
|
|
|
}
|