基本功能已完成

This commit is contained in:
2023-05-15 01:24:18 +08:00
parent 65b4d57675
commit b99f837c72
7 changed files with 75 additions and 57 deletions

View File

@@ -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