添加api管管管理

This commit is contained in:
zmr900709
2020-07-16 09:47:53 +08:00
parent dcd5b86284
commit 5f8e0f5f10
5 changed files with 110 additions and 0 deletions

11
main.js
View File

@@ -12,3 +12,14 @@ const app = new Vue({
...App
})
app.$mount()
// http拦截器将此部分放在new Vue()和app.$mount()之间才能App.vue中正常使用
import httpInterceptor from '@/common/http.interceptor.js'
Vue.use(httpInterceptor, app)
// http接口API集中管理引入部分
import httpApi from '@/common/http.api.js'
Vue.use(httpApi, app)
app.$mount()