FormData 格式提交
let formData = new FormData();
for(let d in params){
formData.append(d,params[d])
}
JSON格式提交
try {
let res = this.$http.put(url,JSON.stringify(params),{headers: {'Content-Type': 'application/json;charset=UTF-8'},emulateJSON:true})
if(res.status == 0){
console.log(1);
if(window.opener){
window.opener.location.href = window.opener.location.href;
window.close();
}else{
this.$router.push({
path: '/SpecialDetails'
});
};
};
} catch (error) {
console.log(eror)
};