基本功能已完成
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
import axios from "axios";
|
||||
|
||||
const ins = axios.create({
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Allow-Methods': 'GET, POST',
|
||||
'Access-Control-Allow-Headers': 'Content-Type, Access-Control-Allow-Headers, Authorization'
|
||||
},
|
||||
responseType: 'json'
|
||||
})
|
||||
const ins = {
|
||||
post: (url, body, config) => fetch(url, {...config, method: "POST", body}),
|
||||
get: (url, config) => fetch(url, {...config, method: "GET"}),
|
||||
}
|
||||
export default ins
|
||||
|
||||
Reference in New Issue
Block a user