Files
sgxt_web/src/utils/document.js
2025-04-12 14:54:02 +08:00

23 lines
462 B
JavaScript

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)
})
}