Browse Source

静态引入plat-info.js

luyanan 6 years ago
parent
commit
4cb95479f0
3 changed files with 4 additions and 3 deletions
  1. 1 0
      index.html
  2. 2 2
      src/main.js
  3. 1 1
      static/plat-info.js

+ 1 - 0
index.html

6
  	<meta name="description" content="">
6
  	<meta name="description" content="">
7
  	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
7
  	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
8
  	<link rel="shortcut icon" type="image/png" href="./static/favicon.ico">
8
  	<link rel="shortcut icon" type="image/png" href="./static/favicon.ico">
9
    <script type="text/javascript" src="static/plat-info.js"></script>
9
  	<title></title>
10
  	<title></title>
10
  </head>
11
  </head>
11
  <body>
12
  <body>

+ 2 - 2
src/main.js

16
import '../static/ueditor/ueditor.parse.js';
16
import '../static/ueditor/ueditor.parse.js';
17
17
18
import Cookies from 'js-cookie';
18
import Cookies from 'js-cookie';
19
import '../static/plat-info';
20
19
21
Vue.use(axiosH);
20
Vue.use(axiosH);
22
Vue.use(ElementUI);
21
Vue.use(ElementUI);
25
Vue.use(defaultPage);
24
Vue.use(defaultPage);
26
Vue.use(CityPick);
25
Vue.use(CityPick);
27
26
28
var PLAT = global.PLAT;
27
// var PLAT = window.PLAT;
29
28
30
/* eslint-disable no-new */
29
/* eslint-disable no-new */
31
new Vue({
30
new Vue({
38
    };
37
    };
39
  },
38
  },
40
  mounted() {
39
  mounted() {
40
    /* eslint-disable no-undef */
41
    this.plat = PLAT.info;
41
    this.plat = PLAT.info;
42
    document.title = this.plat.title;
42
    document.title = this.plat.title;
43
    Cookies.set('platId', this.plat.id);
43
    Cookies.set('platId', this.plat.id);

+ 1 - 1
static/plat-info.js

23
  ]
23
  ]
24
};
24
};
25
25
26
global.PLAT = PLAT;
26
window.PLAT = PLAT;
27
// export default PLAT;
27
// export default PLAT;