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

import Vant from 'vant';
import 'vant/lib/index.css';
import './style/iconfont/iconfont.css';

Vue.use(Vant);

// import './utils/rem'
import 'amfe-flexible/index.js'
import BaiduMap from 'vue-baidu-map'
import proxyPost from './utils/http'

// 富文本编辑器
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme

// vue-video-js
import VideoPlayer from 'vue-video-player';
require('video.js/dist/video-js.css');
require('vue-video-player/src/custom-theme.css');
Vue.use(VideoPlayer);

Vue.prototype.$http = proxyPost
import './permission'
import './style/index.scss'

// 签字版
import SignCanvas from 'sign-canvas';
Vue.use(SignCanvas);

Vue.use(VueQuillEditor, {
	placeholder: '请输入通知内容'
})

Vue.prototype.$getTime = function formatDate(time) {

	var myyear = time.getFullYear();
	var mymonth = time.getMonth() + 1;
	var myweekday = time.getDate();
	
	var _time = time.toLocaleTimeString('chinese', { hour12: false });
	
	if (mymonth < 10) {
		mymonth = "0" + mymonth;
	}
	if (myweekday < 10) {
		myweekday = "0" + myweekday;
	}
	return (myyear + "-" + mymonth + "-" + myweekday + ' ' + _time);
}

Vue.use(BaiduMap, {
	ak: 'TUaOXzy2VXRVqN79XRxr2M1i2mW7L7yl'
})
Vue.config.productionTip = false

Vue.config.devtools = true

new Vue({
	router,
	store,
	render: h => h(App)
}).$mount('#app')
