axios({
method: "POST",
url: BASEURL + "/sys-mgr/sys/logout",
params: {
// 這裏是參數
}
})
.then(function(res) {
if (res.data.code == 0) {
} else {
}
})
這是普通請求
axios({
method: "post",
url: BASEURL + '/sys-mgr/sys/login',
data: data, // 這裏的data是將 需要傳入的參數json序列化
headers: {
"Content-Type": "application/json;charset=UTF-8"
}
})
.then(function(res) {
if (res.data.code == 0) {
} else {
}
})
這是json格式請求