import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import axios from 'axios'
import VueAxios from 'vue-axios'

import Layui from '@layui/layui-vue'
import '@layui/layui-vue/lib/index.css'

import 'bootstrap/dist/css/bootstrap.min.css'
import 'bootstrap/dist/js/bootstrap.min.js'

import ElementPlus from 'element-plus';
import 'element-plus/theme-chalk/index.css';

import locale from 'element-plus/es/locale/lang/zh-cn';

import localStorage from './plugins/good-storage';

import countDown from './components/countDown';
// import './assets/all.css'

// import 'jquery/dist/jquery.min.js'

// import layer from '@layui/layer-vue';
// import '@layui/layer-vue/lib/index.css';

// import './static/ajax/libs/layer/theme/default/layer.css'
// import './static/ajax/libs/layer/layer.min.js'

// axios.defaults.baseURL = '/api';
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
// axios.defaults.timeout = 60000;

const app = createApp(App);//建立一个vue3app
app.use(router);
app.use(VueAxios, axios);
app.use(Layui);
app.use(ElementPlus, { locale });
// app.use(layer);
app.mount('#app');//将这个vue3app全局挂载到#app元素上
app.component('count-down', countDown);//全局倒计时组件
//axios 关联到vue实例对象的全局属性中
app.config.globalProperties.$axios=axios;
app.config.globalProperties.$LocalStorage=localStorage;
