yangan
11 小时以前 5c63b1fccedfcd208f3434edb79926c206c3d26f
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'
import Vue from 'vue'
import '../unattended-app/static/fonts/commontfont.css'
 
Vue.config.productionTip = false
 
App.mpType = 'app'
uni.$u.config.unit = 'rpx'
// #ifdef MP-WEIXIN
import tabbar from '@/components/tab-bar/tab-bar.vue'
Vue.use('tab-bar', tabbar)
// #endif
 
// 引入全局 uView 框架
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
 
// 全局存储vuex的封装
import store from '@/store'
Vue.use(store)
 
// 请求相关
import {
    reqAll,
    reqGet,
    reqGet2,
    reqGetId,
    reqPost,
    reqPut,
    reqAllJson,
    reqDelete
} from '@/api/index.js'
Vue.prototype.$reqAll = reqAll
Vue.prototype.$reqAllJson = reqAllJson
Vue.prototype.$reqGet = reqGet
Vue.prototype.$reqGet2 = reqGet2
Vue.prototype.$reqGetId = reqGetId
Vue.prototype.$reqPost = reqPost
Vue.prototype.$reqPut = reqPut
Vue.prototype.$reqDelete = reqDelete
Vue.prototype.$store = store
// 由于微信小程序的运行机制问题,需声明如下一行,H5和APP非必填
const app = new Vue({
    store,
    ...App
})
app.$mount()