提交代码
This commit is contained in:
23
src/utils/document.js
Normal file
23
src/utils/document.js
Normal file
@ -0,0 +1,23 @@
|
||||
import axios from 'axios';
|
||||
const baseUrl = "/daglApi";
|
||||
|
||||
export function getInfoPost(url, data = {}, token, fun) {
|
||||
axios.post(`${baseUrl}${url}`, data, {
|
||||
headers: {
|
||||
"founder.authorization": `bearer ${token}`,
|
||||
}
|
||||
}).then(res => {
|
||||
fun(res.data)
|
||||
})
|
||||
}
|
||||
|
||||
export function getInfo(url, params = {}, token, fun) {
|
||||
axios.get(`${baseUrl}${url}`, {
|
||||
params,
|
||||
headers: {
|
||||
"founder.authorization": `bearer ${token}`,
|
||||
},
|
||||
}).then(res => {
|
||||
fun(res.data)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user