参考:https://blog.csdn.net/ab200814787/article/details/69384860
var save_data={"id":khbh,"msg":citybm};
$.ajax({
headers: {
"Authorization":token//此处放置请求到的用户token
},
url:add_url,
type: "post",
data:JSON.stringify(save_data),
contentType: "application/json",
dataType: 'json',
async: true,
success: function(res) {
console.log("请求结果=="+JSON.stringify(res));
},
error:function() {
alert("请求失败!");
}
});
}