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
| import App from './App'
| import Vue from 'vue'
| import uView from '@/uni_modules/uview-ui'
| import createStore from './service/store'
| import config from './config/index.js'
| import defineApi from './service/request'
| import '@/static/js/utils/filter'
|
| const store = createStore(Vue);
| const $api = new defineApi(store,config)
|
| Vue.config.productionTip = false
| App.mpType = 'app'
| Vue.use(uView)
|
| Vue.prototype.$modal = function(content,callback=()=>{},type = 0,title="提示") {
| uni.showModal({
| title,
| content,
| icon: type = 0 ? 'success' : 'error',
| showCancel:false,
| success:callback
| })
| }
| Vue.prototype.$config = config;
| Vue.prototype.$api = $api;
|
| const app = new Vue({
| ...App,
| store: store
| })
| app.$mount()
|
|