2024年06月12日 建站教程
import Axios from './config'
export function get(url, params = {}) {
return new Promise((resolve, reject) => {
Axios.get(url, {
params: params
})
.then(response => {
resolve(response.data)
})
.catch(error => {
reject(error)
})
})
}
PS:'./config'代码,请查看《Vue中如何实现Axios封装》
本文链接:http://so.lmcjl.com/news/6414/