main.js 893 B

12345678910111213141516171819202122232425262728293031323334
  1. import Vue from 'vue'
  2. import App from './App'
  3. import Cookies from 'js-cookie'
  4. import pageHead from './components/page-head.vue'
  5. import pageFoot from './components/page-foot.vue'
  6. import uLink from '@/components/uLink.vue'
  7. import store from './store';
  8. import auth from '@/common/auth.js';
  9. import util from '@/common/util.js';
  10. Vue.config.productionTip = false;
  11. //Vue.prototype.$store = store
  12. Vue.prototype.$backgroundAudioData = {
  13. playing: false,
  14. playTime: 0,
  15. formatedPlayTime: '00:00:00'
  16. }
  17. Vue.prototype.$adpid = "1111111111";
  18. /* 常用函数封装为一个js文件,并设置为vue实例的一个属性,以方便调用 */
  19. Vue.prototype.$util=util;
  20. Vue.prototype.getDate = util.getDate();
  21. Vue.component('page-head', pageHead)
  22. Vue.component('page-foot', pageFoot)
  23. Vue.component('uLink', uLink)
  24. App.mpType = 'app'
  25. const app = new Vue({
  26. store,
  27. ...App
  28. })
  29. app.$mount() //挂载Vue实例