|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import App from './App'
- import Vue from 'vue'
- import store from '@/store';
- import mixins from '@/common/mixins.vue'
-
- Vue.mixin(mixins)
-
- // 引入vuex
- Vue.prototype.$u = {}
- const vuexStore = require("@/store/$u.mixin.js");
- Vue.mixin(vuexStore);
-
- // 引入uview-ui
- import uView from "uview-ui";
- Vue.use(uView);
-
- // #ifndef VUE3
- import './uni.promisify.adaptor'
- Vue.config.productionTip = false
- App.mpType = 'app'
- const app = new Vue({
- ...App
- })
- app.$mount()
- // #endif
-
- // #ifdef VUE3
- import { createSSRApp } from 'vue'
- export function createApp() {
- const app = createSSRApp(App)
- return {
- app
- }
- }
- // #endif
-
- // 接口集中管理
- import httpInstall from '@/http/install.js'
- Vue.use(httpInstall, app)
-
- import http from '@/http/api.js'
- Vue.prototype.$http = http
-
- // 公共函数
- import globalFunc from '@/utils/func.js'
- Vue.use(globalFunc, app);
|