819527061@qq.com
2024-05-11 f73ed7862edc9c3cb78a2610486643a2fa079fde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import App from './App'
 
// #ifndef VUE3
import Vue from 'vue'
//引入vuex
import store from './store'
//把vuex定义成全局组件
Vue.prototype.$store = store
 
import {getStore, setStore, removeStore} from '@/libs/store.js'
Vue.prototype.getStore = getStore
Vue.prototype.setStore = setStore
Vue.prototype.removeStore = removeStore
 
import uView from "uview-ui";
Vue.use(uView);
 
import * as navTo from '@/libs/navTo'
Vue.prototype.$navTo = navTo
 
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App
})
 
// http拦截器,此为需要加入的内容,如果不是写在common目录,请自行修改引入路径
import httpInterceptor from '@/api/http.interceptor.js'
// 这里需要写在最后,是为了等Vue创建对象完成,引入"app"对象(也即页面的"this"实例)
Vue.use(httpInterceptor, app)
 
// http接口API集中管理引入部分
import httpApi from '@/api/http.api.js'
Vue.use(httpApi, app)
 
app.$mount()
// #endif
 
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif