Merge pull request '添加del方法' (#42) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/42
This commit is contained in:
commit
5fb97c7c78
@ -27,6 +27,11 @@ const post: Get = async function (url: string,data?: unknown) {
|
||||
return res.data;
|
||||
}
|
||||
|
||||
const del: Get = async function (url: string, data?: unknown){
|
||||
const res = await axios.delete(url, {params:data})
|
||||
return res.data;
|
||||
}
|
||||
|
||||
function setToken(){
|
||||
axios.defaults.headers.common['Authorization'] = "Bearer " + getValue("token");
|
||||
}
|
||||
@ -34,5 +39,6 @@ function setToken(){
|
||||
export {
|
||||
get,
|
||||
post,
|
||||
del,
|
||||
setToken
|
||||
}
|
Loading…
Reference in New Issue
Block a user