anxiao_web/rtc/js/request.js

20 lines
416 B
JavaScript
Raw Permalink Normal View History

2024-07-24 09:22:32 +08:00
export function alarmtaskAddReq(url,data,type="post"){
return new Promise((resolve,reject)=>{
$.ajax({
url:url,
type:type,
dataType:"json",
data:JSON.stringify(data),
headers:{
"Content-Type":"application/json;charset=utf-8",
"Authorization":unameInfo["sessionId"]
},
success:function(resData){
resolve(resData);
},
error:function(error){
reject(error);
}
})
})
}