暂无描述

center.js 792B

123456789101112131415161718192021222324252627282930313233343536
  1. import '@/libs/common.js';
  2. import Vue from 'vue';
  3. import App from './center.vue';
  4. import router from './router';
  5. import store from '@/store/index';
  6. import './permission';
  7. import CityPick from '@/components/global-component/citypick/CityPick'
  8. import Cookies from 'js-cookie';
  9. Vue.component('CityPick', CityPick);
  10. /* eslint-disable no-new */
  11. new Vue({
  12. el: '#app',
  13. router: router,
  14. store: store,
  15. render: h => h(App),
  16. data() {
  17. return {
  18. plat: {}
  19. };
  20. },
  21. mounted() {
  22. /* eslint-disable no-undef */
  23. this.plat = PLAT.info;
  24. document.title = this.plat.title;
  25. Cookies.set('platId', process.env.PLAT_ID);
  26. Cookies.set('platSource', this.plat.source);
  27. },
  28. created () {
  29. router.afterEach((to, from, next) => {
  30. window.scrollTo(0, 0);
  31. });
  32. }
  33. });