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 newDate = new Date(date);
	let year = newDate.getFullYear();
	let month = newDate.getMonth().toString().padStart(2, 0);
	let day = newDate.getDay().toString().padStart(2, 0);
	return year + '-' + month + '-' + day;
})
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
