import App from './App'
import store from './store';

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


import uniGo from '@/utils/unIGO.js';
Vue.prototype.$uniGo = uniGo;

import checkRules from '@/utils/utils.js';
Vue.prototype.$checkRules = checkRules

import utilsMethods from '@/utils/utils.js';
Vue.prototype.$utilsMethods = utilsMethods;
// 底部导航
import comTabbar from '@/components/tabbar/tabbar';
Vue.component('com-tabbar', comTabbar)

// 上传
import comUpload from '@/components/upload/aIndex.vue';
Vue.component('com-upload', comUpload)

// 头部导航
import comNavBar from '@/components/navBar/aIndex';
Vue.component('com-navbar', comNavBar)

//人员评论列表
import commentList from '@/components/comment/comment.vue'
Vue.component('comment-list', commentList)

// 时间过滤器
Vue.filter("formatDate", (date) => {
	let d = new Date(date);
	let month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1);
	let day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate();
	let hours = d.getHours() < 10 ? '0' + d.getHours() : d.getHours();
	let min = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes();
	let sec = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds();
	let times;
	times = d.getFullYear() + '-' + month + '-' + day;
	return times
})
uni.$u.setConfig({
	config: {
		unit: 'rpx'
	},
	props: {
		radio: {
			size: 15
		}
	}
})

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App,
	store
})
app.$mount()
// #endif

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