// 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 store from './store'; import ElementUI from 'element-ui'; import frce from '../static/frce'; import http from './api/http'; // import publicMethods from '../static/publicMethods'; import 'element-ui/lib/theme-chalk/index.css'; import axios from 'axios'; //引入axios import ports from './api/ports.js'; //api接口文档 import publicMethods from '../static/publicMethods.js'; import md5 from 'js-md5'; Vue.use(ElementUI); axios.defaults.headers.post['Content-Type'] = 'Content-Type: application/json'; // post请求头 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'; Vue.config.productionTip = false; // 注册表情包数组 Vue.prototype.$frce = frce.frce; // 注册加密文档 Vue.prototype.$md5 = md5; // 公共方法 Vue.prototype.$ports = ports; Vue.prototype.$http = http; Vue.prototype.post = axios.post; Vue.prototype.get = axios.get; Vue.prototype.$public = publicMethods; /* eslint-disable no-new */ new Vue({ el: '#app', router, store, components: { App }, template: '' })