-
Notifications
You must be signed in to change notification settings - Fork 268
/
Copy pathindex.vue
executable file
·58 lines (58 loc) · 1.53 KB
/
index.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<template>
<div>
<iframe
id="iframeName"
:src="visualSrc"
frameborder="0"
width="100%"
:height="height"
v-if="isSkip"/>
<div
style="display: flex; justify-content: center; align-items: center;"
:style="{'height': height + 'px'}"
v-else>
<span>{{ info }}</span>
</div>
</div>
</template>
<script>
import module from './index';
export default {
mixins: [module.mixin],
data() {
return {
height: 0,
visualSrc: null,
isSkip: false,
info: '请在跳转页面查看……',
};
},
mounted() {
this.height = this.$route.query.height;
this.init();
},
methods: {
init() {
if (this.$route.query.isSkip) {
const errCode = this.$route.query.errCode;
const addr = module.data.ENVIR === 'dev' ? 'localhost:8088' : window.location.host;
this.visualSrc = `http://${addr}/dws/help/errorcode/${errCode}.html`;
this.isSkip = true;
} else {
this.isSkip = false;
this.info = '请在跳转页面查看……';
this.linkTo();
}
if (!this.height) {
this.height = window.innerHeight - 230;
}
},
linkTo() {
const newTab = window.open('about:blank');
setTimeout(() => {
newTab.location.href = this.getFAQUrl();
}, 500);
},
},
};
</script>