forked from jeecgboot/jeecg-uniapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
90 lines (59 loc) · 2.06 KB
/
main.js
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import Vue from 'vue'
import App from './App'
import store from './store'
import MinCache from'./common/util/MinCache.js'
import tip from'./common/util/tip.js'
import configService from'./common/service/config.service.js'
import router from './common/router'
import {RouterMount} from './plugin/uni-simple-router/index.js'
//引入mescroll插件
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
Vue.component('mescroll-body', MescrollBody);
Vue.component('mescroll-uni', MescrollUni);
// 注册缓存器
Vue.use(MinCache,{timeout: 6})
// store
Vue.prototype.$store=store;
// tip
Vue.prototype.$tip=tip;
// config
Vue.prototype.$config=configService;
// request请求
import { http } from '@/common/service/service.js'
Vue.prototype.$http = http
import home from './pages/home/home.vue'
Vue.component('home',home)
import people from './pages/user/people.vue'
Vue.component('people',people)
// 自定义组件
import mySelect from './components/my-componets/my-select.vue'
Vue.component('mySelect',mySelect)
import myImageUpload from './components/my-componets/my-image-upload.vue'
Vue.component('myImageUpload',myImageUpload)
import myPage from './components/my-componets/my-page.vue'
Vue.component('myPage',myPage)
import basics from './pages/basics/home.vue'
Vue.component('basics',basics)
import components from './pages/component/home.vue'
Vue.component('components',components)
import plugin from './pages/plugin/home.vue'
Vue.component('plugin',plugin)
import cuCustom from './plugin/colorui/components/cu-custom.vue'
Vue.component('cu-custom',cuCustom)
// import VConsole from './js_sdk/vconsole.min'
// var vConsole = new VConsole();
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
store,
MinCache,
...App
})
//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5
RouterMount(app,'#app');
// #endif
// #ifndef H5
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif