import '.env.js'
import App from './App'
//引入前置路由颜值
import {
	router,
	RouterMount
} from './service/router.js' //路径换成自己的
import tools from './service/tools.js' //公共工具
Vue.use(router)
// #ifndef VUE3
import Vue from 'vue'
import store from './store'

// 搜索
import Search from './components/en-utils/en-search/en-search.vue'
// 顶部导航栏
import Nav from './components/en-utils/en-nav/en-nav.vue'
// 自定义底部导航
import Tab from './components/en-utils/en-tab/en-tab.vue'
// 提交按钮
import EnButton from './components/en-utils/en-button/en-button.vue'
// 无数据
import Enblank from './components/en-utils/en-blank/en-blank.vue'
// scroll-view组件
import EnScroll from './components/en-scroll/en-scroll.vue'

Vue.component('Search', Search)
Vue.component('Nav', Nav)
Vue.component('Tab', Tab)
Vue.component('EnButton', EnButton)
Vue.component('Enblank', Enblank)
Vue.component('EnScroll', EnScroll)

Vue.prototype.$tools = tools

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App,
	store
})
// app.$mount()

// #ifdef H5
RouterMount(app, router, '#app')
// #endif

// #ifndef H5
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif

// #endif


// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app,
	}
}
// #endif