main.js 434 B

1234567891011121314151617181920
  1. import Vue from 'vue'
  2. import App from './App'
  3. import { myRequest } from 'util/api.js'
  4. Vue.config.productionTip = false
  5. import MinCache from './static/cache.js'
  6. //引入vuex
  7. import store from './store'
  8. //把vuex定义成全局组件
  9. Vue.prototype.$store = store
  10. Vue.use(MinCache,{timeout:1800}) //缓存时间30分钟
  11. App.mpType = 'app'
  12. Vue.prototype.$myRequest = myRequest
  13. const app = new Vue({
  14. ...App,
  15. store
  16. })
  17. app.$mount()