添加了拦截器

This commit is contained in:
2020-09-24 15:33:12 +08:00
parent 4fbf1353da
commit ed42b204d7
8 changed files with 42 additions and 13 deletions

View File

@@ -8,11 +8,18 @@
<script lang="ts">
import { defineComponent } from 'vue';
import HelloWorld from '@/components/HelloWorld.vue'; // @ is an alias to /src
import { getinfo } from "../api/index"
export default defineComponent({
name: 'Home',
components: {
HelloWorld,
},
setup(){
// ctx.axios.get("https://www.baidu.com")
getinfo().then((res)=>{
console.log(res)
})
}
});
</script>