// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import Cube from './index'
import 'lib-flexible'
// import host from '../src/request/host'
// import {get,post} from './service/http'
Vue.use(Cube)
// 修改请求接口（删掉地址栏中的app2）
let domainName = document.domain;//域名
let protocolName = document.location.protocol;//http协议
axios.defaults.baseURL=protocolName + '//' + domainName;

// axios.defaults.timeout = 5000;
Vue.prototype.$http= axios
Vue.config.productionTip = false
Vue.prototype.$host = protocolName + '//' + domainName;

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
