增加新的跳转的页面

This commit is contained in:
daihh
2022-12-13 20:16:08 +08:00
parent be67ed8dd3
commit 3a5a6217fc
2 changed files with 48 additions and 0 deletions

View File

@@ -39,6 +39,13 @@ export const constantRoutes = [{
name: 'index',
meta: { title: '首页', icon: 'dashboard', noCache: true, affix: false },
},
{
path: '/forward',
hidden: true,
component: (resolve) => require(['@/views/Forward'], resolve),
name: 'forward',
meta: { title: '详细信息', icon: 'dashboard', noCache: true, affix: false },
},
{
path: '/course',
hidden: true,

41
src/views/Forward.vue Normal file
View File

@@ -0,0 +1,41 @@
<template>
<div class="box">
<portal-header :hideSearch="true"></portal-header>
<iframe :src="url" style="width: 100%;height: 100%;margin-top: 30px;" frameborder="0"></iframe>
<portal-footer></portal-footer>
</div>
</template>
<script>
import portalHeader from "@/components/PortalHeader.vue";
import portalFooter from "@/components/PortalFooter.vue";
export default {
components: {
portalHeader,
portalFooter
},
data(){
return {
url: "",
boeUrl:process.env.VUE_APP_BOE_WEB_URL
}
},
mounted() {
let params = this.$route.query.params;// 跳转的参数 encodeURIComponent 之后的
let to = this.$route.query.to;//跳转的地址,以 /开头的地址
let urlPre=window.location.protocol+'//'+window.location.host;
this.url=urlPre+to
if(params){
this.url=this.url+'?'+params;
}
},
methods:{
}
}
</script>
<style lang="scss" >
.box{
// width: 100%;
height: 100%;
}
</style>