import App from './App'

import uView1 from 'uview-ui1'
import uView from '@/components/uview-ui'
import * as tools from 'common/utils/tools'
import $U from 'common/utils/util.js'
import $C from 'common/utils/config.js'
import * as api from 'common/api/index.js'
import moment from 'moment'


Vue.use(uView1)
Vue.use(uView)

// import Vconsole from 'vconsole'
// let vConsole = new Vconsole()
// Vue.use(vConsole)

Vue.prototype.$api = api
Vue.prototype.$U = $U
Vue.prototype.$C = $C
Vue.prototype.$moment = moment

// #ifndef VUE3
import Vue from 'vue'

Vue.config.productionTip = false
// 工具函数
Object.keys(tools).forEach(key => {
    Vue.prototype[`$${key}`] = tools[key]
})

App.mpType = 'app'
const app = new Vue({...App})
app.$mount()

// import BaiduMap from 'vue-baidu-map'

// Vue.use(BaiduMap, {
//   // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
//   ak: 'dGrhIK6XiztWeuoUGd3pvIh9jL01UWPe'
// })

// #endif

// 解决百度地图跨域问题
import {VueJsonp} from 'vue-jsonp'

Vue.use(VueJsonp)


// #ifdef VUE3
import {createSSRApp} from 'vue'

export function createApp() {
    const app = createSSRApp(App)
    return {app}
}

// #endif
