main.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // The Vue build version to load with the `import` command
  2. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
  3. import Vue from 'vue'
  4. import ElementUI from 'element-ui';
  5. import 'element-ui/lib/theme-chalk/index.css';
  6. import App from './App'
  7. import router from './router'
  8. import axios from 'axios'
  9. Vue.prototype.$axios = axios //全局注册,使用方法为:this.$axios
  10. import qs from 'qs'
  11. Vue.prototype.qs = qs //全局注册,使用方法为:this.qs
  12. Vue.use(ElementUI);
  13. // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
  14. // axios.defaults.timeout = 30000;
  15. // axios.defaults.baseURL = 'http://47.104.218.216:8006/' //线下杨明明
  16. // axios.defaults.withCredentials = true //axios请求时携带session
  17. // axios.defaults.crossDomain = true
  18. Vue.config.productionTip = false
  19. import 'babel-polyfill' //兼容IE11
  20. require("babel-polyfill")
  21. import promise from 'es6-promise'
  22. promise.polyfill();
  23. import './assets/icon/iconfont.css'
  24. /* eslint-disable no-new */
  25. new Vue({
  26. el: '#app',
  27. router,
  28. components: { App },
  29. template: '<App/>'
  30. })