export const get = (url, params = {}) => {
return new Promise((resolve, reject) => {
axios
.get(
url,
{ params },
{
baseURL:
"https://www.fastmock.site/mock/ae8e9031947a302fed5f92425995aa19/jd",
}
)
.then(
(response) => {
resolve(response.data);
},
(err) => {
reject(err);
}
);
});
};```
是这段代码出了问题,换成老师源码一切正常。