first commit
This commit is contained in:
35
main.js
Normal file
35
main.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
|
||||
|
||||
import HttpRequest from './common/httpRequest'
|
||||
import HttpCache from './common/cache'
|
||||
import queue from './common/queue'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
Vue.prototype.$Request = HttpRequest;
|
||||
Vue.prototype.$queue = queue;
|
||||
|
||||
Vue.prototype.$Sysconf = HttpRequest.config;
|
||||
Vue.prototype.$SysCache = HttpCache;
|
||||
|
||||
App.mpType = 'app'
|
||||
|
||||
// 引入全局uView
|
||||
import uView from "uview-ui";
|
||||
Vue.use(uView);
|
||||
|
||||
|
||||
const app = new Vue({
|
||||
...App
|
||||
})
|
||||
|
||||
// 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()
|
||||
Reference in New Issue
Block a user