main.js 803 B

123456789101112131415161718192021222324
  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 App from './App'
  5. import ElementUI from 'element-ui';
  6. import http from './api/http';
  7. import 'element-ui/lib/theme-chalk/index.css';
  8. import publicMethods from './assets/publicMethods';
  9. import md5 from '../static/md5';
  10. Vue.use(ElementUI);
  11. // 引入api
  12. import axios from 'axios' // 接口封装,请求拦截
  13. Vue.prototype.$axios = axios;
  14. Vue.prototype.$http = http;
  15. Vue.prototype.$md5 = md5;
  16. Vue.prototype.$public = publicMethods;
  17. Vue.config.productionTip = false;
  18. // Vue.prototype.$axios.defaults.baseURL = 'http://192.168.2.186:8090'
  19. /* eslint-disable no-new */
  20. new Vue({
  21. el: '#app',
  22. components: { App },
  23. template: '<App/>'
  24. })