import Vue from 'vue'
import App from './App'

import uView from "uview-ui";
Vue.use(uView);

Vue.config.productionTip = false

//mescroll刷新组件
import MescrollBody from "@/components/mescroll-body/mescroll-body.vue"
Vue.component('mescroll-body', MescrollBody)

import mescrollUni from "@/components/mescroll-body/mescroll-uni.vue"
Vue.component('mescrollUni', mescrollUni)

import {shareConfig} from "@/common/utils/share.js"
Vue.prototype.$shareConfig = shareConfig

Vue.prototype.$isWxBrowser = () => {
	let na = navigator.userAgent.toLowerCase();
	return na.indexOf('micromessenger') !== -1;
}

// 全局注入
import Mixin from '@/common/utils/mixin.js'
Vue.mixin(Mixin)

// 微信函数封装
import mpi from '@/common/utils/mpi.js'
Vue.prototype.$mpi = mpi

//封装提示工具
import dialog from '@/common/utils/dialog.js'
Vue.prototype.$dialog = dialog

//全局变量
import Global from '@/common/utils/global.js'
Vue.prototype.$global = Global

App.mpType = 'app'

const app = new Vue({
    ...App
})
// http拦截器，将此部分放在new Vue()和app.$mount()之间，才能App.vue中正常使用
import httpInterceptor from '@/common/http/http.interceptor.js'
Vue.use(httpInterceptor, app)

// http接口API集中管理引入部分
import httpApi from '@/common/http/http.api.js'
Vue.use(httpApi, app)

app.$mount()
