示例代码

// axios创建实例对象来发起请求
const fun = axios.create({
baseURL: 'https://api.apiopen.top'
});
fun({
url: 'getJoke'
}).then(response => console.log(response));