luyanan преди 6 години
родител
ревизия
37a5603ad8
променени са 2 файла, в които са добавени 11 реда и са изтрити 16 реда
  1. 0 12
      src/components/Main.vue
  2. 11 4
      src/main.js

+ 0 - 12
src/components/Main.vue

15
<script type="text/ecmascript-6">
15
<script type="text/ecmascript-6">
16
  import TheHeader from './main-views/TheHeader.vue';
16
  import TheHeader from './main-views/TheHeader.vue';
17
  import TheFooter from './main-views/TheFooter.vue';
17
  import TheFooter from './main-views/TheFooter.vue';
18
  import Cookies from 'js-cookie';
19
  import PLAT from '../../static/plat-info';
20
18
21
  export default {
19
  export default {
22
    data() {
23
      return {
24
        plat: {}
25
      };
26
    },
27
    mounted() {
28
      this.plat = PLAT.info;
29
      Cookies.set('platId', this.plat.id);
30
      Cookies.set('platSource', this.plat.source);
31
    },
32
    components: {
20
    components: {
33
      TheHeader,
21
      TheHeader,
34
      TheFooter
22
      TheFooter

+ 11 - 4
src/main.js

15
import '../static/ueditor/lang/zh-cn/zh-cn.js';
15
import '../static/ueditor/lang/zh-cn/zh-cn.js';
16
import '../static/ueditor/ueditor.parse.js';
16
import '../static/ueditor/ueditor.parse.js';
17
17
18
import Cookies from 'js-cookie';
19
import PLAT from '../static/plat-info';
20
18
Vue.use(axiosH);
21
Vue.use(axiosH);
19
Vue.use(ElementUI);
22
Vue.use(ElementUI);
20
Vue.use(Loading);
23
Vue.use(Loading);
27
  el: '#app',
30
  el: '#app',
28
  router: router,
31
  router: router,
29
  render: h => h(App),
32
  render: h => h(App),
30
  data: {
31
33
  data() {
34
    return {
35
      plat: {}
36
    };
32
  },
37
  },
33
  mounted () {
34
38
  mounted() {
39
    this.plat = PLAT.info;
40
    Cookies.set('platId', this.plat.id);
41
    Cookies.set('platSource', this.plat.source);
35
  },
42
  },
36
  created () {
43
  created () {
37
    router.afterEach((to, from, next) => {
44
    router.afterEach((to, from, next) => {