1.使用headers
参数
$.ajax({
url: interface_getDwjbxx,
async: false,
type: "GET",
data: {"dwId": urlParamsJson.dwId},
headers: {'Authorization': layui.sessionData("checkModel").Authorization},
dataType: "json",
success: function (result) {
// 基本信息
if (result.code == 1000) {
if(result.data){
template.defaults.escape = false;
var html = template('unit_info_template', result.data);
document.getElementById('unitBaseInfo').innerHTML = html;
}
} else {
layer.alert('查询单位基本信息出错!');
}
},
error: function (error) {
layer.alert("查询单位基本信息出错!");
}
});
2.使用beforeSend方法
$.ajax({
url: interface_getDwjbxx,
async: false,
type: "GET",
data: {"dwId": urlParamsJson.dwId},
dataType: "json",
beforeSend: function(request) {
request.setRequestHeader("Authorization", layui.sessionData("checkModel").Authorization);
},
success: function (result) {
// 基本信息
if (result.code == 1000) {
if(result.data){
template.defaults.escape = false;
var html = template('unit_info_template', result.data);
document.getElementById('unitBaseInfo').innerHTML = html;
}
} else {
layer.alert('查询单位基本信息出错!');
}
},
error: function (error) {
layer.alert("查询单位基本信息出错!");
}
});
最新评论
能弄个电视apk 就好了
求分享站点。https://www.ziyedm.com 子夜动漫 无广告,更新及时
+62 +63 都不行 一直邮箱 验证也上不去 要么就呼叫来电 或者发送到另一台设备 但是另一台设备没有收到码 这个文章也看过了
telegram x接不到验证码