先提交
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import qs from "query-string"
|
||||
|
||||
const ins = {
|
||||
post: (url, body, config) => fetch(url, {...config, method: "POST", body}),
|
||||
get: (url, config) => fetch(url, {...config, method: "GET"}),
|
||||
post: (url, body, config) => fetch(qs.stringifyUrl({url, query: config.params}), {...config, method: "POST", body}),
|
||||
get: (url, config) => fetch(qs.stringifyUrl({url, query: config.params}), {...config, method: "GET"}),
|
||||
}
|
||||
export default ins
|
||||
|
||||
Reference in New Issue
Block a user