forked from oddfar/uni-app_campus_web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
47 lines (43 loc) · 921 Bytes
/
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
import App from './App'
// uView
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
import request from '@/utils/request'
// 将创建好的请求实例挂载在 uni 对象上
uni.$ajax = request
//全局方法
import {
parseTime,handleTree
} from '@/utils/common'
Vue.prototype.parseTime = parseTime
Vue.prototype.handleTree = handleTree
import {
handleCampusUrl,
diffTime,
handelTimeFormat
} from '@/utils/campus'
Vue.prototype.handleCampusUrl = handleCampusUrl
Vue.prototype.diffTime = diffTime
Vue.prototype.handelTimeFormat = handelTimeFormat
import MyConfig from "config.js"
Vue.prototype.MyConfig = MyConfig;
// #ifndef VUE3
import Vue from 'vue'
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