代码样例:
code:
let url = ‘/api/xxx/yyy‘;
let paramObj = JSON.stringify(
{
}
);
axios
.post(url,
paramObj,
{
headers: { ‘Content-Type‘: ‘application/json; charset=utf-8‘ }
})
.then(response => { if (response.data.ResponseStatus) { //do success coding…
} else { //do fail coding…
}
})
.catch(error => {
console.log(error)
})
.finally(() => { //do something…
})
Source Code
手机扫一扫
移动阅读更方便
你可能感兴趣的文章