20 lines
416 B
JavaScript
20 lines
416 B
JavaScript
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);
|
|
}
|
|
})
|
|
})
|
|
} |