// 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 YDUI from 'vue-ydui'; /* 相当于import YDUI from 'vue-ydui/ydui.rem.js' */
import 'vue-ydui/dist/ydui.rem.css';
import publicFun from '@/assets/publicFunction';
Vue.use(YDUI);

Vue.config.productionTip = false;
//  引入api
import axios from 'axios' // 接口封装，请求拦截
import ports from './api/ports.js'
import http from './api/http.js'

Vue.prototype.$ports = ports
Vue.prototype.$http = http
Vue.prototype.$public= publicFun

// 使用之后报错,必须修改原型链
// Vue.use(axios)
Vue.prototype.$axios = axios
// //设置默认活动状态
// publicFun.setCache('activity','home');

// //阻止报错[WDS] Disconnected!
// if (module.hot) {
//   module.hot.accept();
// }

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