20 lines
490 B
JavaScript
20 lines
490 B
JavaScript
|
import { createApp } from 'vue'
|
||
|
import {router} from './route/route'
|
||
|
import './style.css'
|
||
|
import App from './App.vue'
|
||
|
import axios from 'axios';
|
||
|
|
||
|
const createAxios = {
|
||
|
install(app, options) {
|
||
|
axios.defaults.baseURL = 'http://192.168.0.9:7023/population';
|
||
|
// axios.defaults.baseURL = '/population';
|
||
|
axios.defaults.timeout = 20000;
|
||
|
app.provide('axios', axios);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const app = createApp(App);
|
||
|
app.use(router);
|
||
|
app.use(createAxios);
|
||
|
app.mount('#app');
|