import { createApp } from 'vue'
import './style.css'
import * as echarts from 'echarts';
import axios from 'axios';
import App from './App.vue'

const createEcharts = {
    install(app, options) {
        app.provide('echarts', echarts);
    }
}
const createAxios = {
    install(app, options) {
        axios.defaults.baseURL = 'http://219.147.99.164:8082/datahouse/';
        axios.defaults.timeout = 20000;
        axios.defaults.headers.common['PKEY'] = 'a0a25c1e-818a-489e-98c0-0f3a282a49d2';
        axios.defaults.headers.common['PPASS'] = '5be81fdf-2c5d-4ee6-ae45-ffe82b5db2ff';
        app.provide('axios', axios);
    }
}

const app = createApp(App);
app.use(createEcharts);
app.use(createAxios);
app.mount('#app');
