|
@@ -94,6 +94,10 @@ export default class BannerIndex extends Vue {
|
|
|
|
|
|
videoVisible9 = false;
|
|
|
|
|
|
+ token='';
|
|
|
+
|
|
|
+ info=null;
|
|
|
+
|
|
|
mounted() {
|
|
|
// 监听窗口大小变化
|
|
|
window.onresize = () => (() => {
|
|
@@ -105,6 +109,9 @@ export default class BannerIndex extends Vue {
|
|
|
}
|
|
|
|
|
|
created() {
|
|
|
+ this.token = this.getUrlParam('token') ? this.getUrlParam('token') : '';
|
|
|
+
|
|
|
+ this.getData();
|
|
|
this.changeZoom();
|
|
|
this.realSysTime();
|
|
|
this.getMonitor();
|
|
@@ -211,4 +218,23 @@ export default class BannerIndex extends Vue {
|
|
|
clickMonitor9() {
|
|
|
this.videoVisible9 = true;
|
|
|
}
|
|
|
+
|
|
|
+ getUrlParam(name) {
|
|
|
+ return decodeURIComponent((new RegExp(`[?|&]${name}=` + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ''])[1].replace(/\+/g, '%20')) || null; // eslint-disable-line
|
|
|
+ }
|
|
|
+
|
|
|
+ getData() {
|
|
|
+ const data = {
|
|
|
+ token: this.token,
|
|
|
+ };
|
|
|
+
|
|
|
+ api.getData(data).then((res) => {
|
|
|
+ this.info = res.data;
|
|
|
+ this.info.token = this.token;
|
|
|
+ document.title = this.info.title;
|
|
|
+ this.loading = false;
|
|
|
+ }).catch(() => { }).finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|