axios全局配置
时间:2020-12-30 10:59:44
收藏:0
阅读:0
<script> axios.defaults.baseURL=‘http://localhost:8080/student‘;//配置全局属性 axios.defaults.timeout=10000;//超时10s axios.get(‘getAllstudent‘).then(res=>{//在全局配置基础上去网络请求 console.log(res); }) </script>
评论(0)