main.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 pageNavbar from './components/page-navbar.vue'
  7. import uLink from '@/components/uLink.vue'
  8. import store from './store';
  9. import auth from '@/common/auth.js';
  10. import util from '@/common/util.js';
  11. import Vant from 'vant';
  12. import 'common/font-awesome-4.7.0/css/font-awesome.css';
  13. Vue.config.productionTip = false;
  14. //Vue.prototype.$store = store
  15. Vue.prototype.$backgroundAudioData = {
  16. playing: false,
  17. playTime: 0,
  18. formatedPlayTime: '00:00:00'
  19. }
  20. Vue.prototype.$adpid = "1111111111";
  21. /* 常用函数封装为一个js文件,并设置为vue实例的一个属性,以方便调用 */
  22. Vue.prototype.$util=util;
  23. Vue.prototype.getDate = util.getDate();
  24. Vue.component('page-head', pageHead)
  25. Vue.component('page-foot', pageFoot)
  26. Vue.component('page-navbar', pageNavbar)
  27. Vue.component('uLink', uLink)
  28. //Vue.use(Vant);
  29. App.mpType = 'app'
  30. const app = new Vue({
  31. store,
  32. ...App,
  33. })
  34. app.$mount() //挂载Vue实例