File tree Expand file tree Collapse file tree 2 files changed +65
-0
lines changed Expand file tree Collapse file tree 2 files changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ export default {
2+ name : 'FAQ' ,
3+ data : {
4+ ENVIR : process . env . NODE_ENV ,
5+ } ,
6+ component : ( ) => import ( './index.vue' ) ,
7+ } ;
Original file line number Diff line number Diff line change 1+ <template >
2+ <div >
3+ <iframe
4+ id =" iframeName"
5+ :src =" visualSrc"
6+ frameborder =" 0"
7+ width =" 100%"
8+ :height =" height"
9+ v-if =" isSkip" />
10+ <div
11+ style =" display : flex ; justify-content : center ; align-items : center ;"
12+ :style =" {'height': height + 'px'}"
13+ v-else >
14+ <span >{{ info }}</span >
15+ </div >
16+ </div >
17+ </template >
18+ <script >
19+ import module from ' ./index' ;
20+ export default {
21+ mixins: [module .mixin ],
22+ data () {
23+ return {
24+ height: 0 ,
25+ visualSrc: null ,
26+ isSkip: false ,
27+ info: ' 请在跳转页面查看……' ,
28+ };
29+ },
30+ mounted () {
31+ this .height = this .$route .query .height ;
32+ this .init ();
33+ },
34+ methods: {
35+ init () {
36+ if (this .$route .query .isSkip ) {
37+ const errCode = this .$route .query .errCode ;
38+ const addr = module .data .ENVIR === ' dev' ? ' test-dws.weoa.com' : window .location .host ;
39+ this .visualSrc = ` http://${ addr} /dws/help/errorcode/${ errCode} .html` ;
40+ this .isSkip = true ;
41+ } else {
42+ this .isSkip = false ;
43+ this .info = ' 请在跳转页面查看……' ;
44+ this .linkTo ();
45+ }
46+ if (! this .height ) {
47+ this .height = window .innerHeight - 230 ;
48+ }
49+ },
50+ linkTo () {
51+ const newTab = window .open (' about:blank' );
52+ setTimeout (() => {
53+ newTab .location .href = this .getFAQUrl ();
54+ }, 500 );
55+ },
56+ },
57+ };
58+ </script >
You can’t perform that action at this time.
0 commit comments