Merge branch 'stat' into third

This commit is contained in:
daihh
2022-12-14 07:55:00 +08:00
3 changed files with 57 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>

View File

@@ -555,6 +555,15 @@ export default {
this.$router.push('/course/boeframe?id='+courseId+'&type='+item.type);
//此处使用window.open有问题
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`);
}else if(item.source == 3){
//跳转到管理系统的页面
if (item.type == 30){ //线下课,面授课
let params=encodeURIComponent('courseId='+courseId);
this.$router.push('/forward?to=/fe-student/faceteach&params='+params);
}else if(item.type==40){ //学习项目
let params=encodeURIComponent('projectId='+courseId);
this.$router.push('/forward?to=/fe-student/projectdetails&params='+params);
}
} else {
if (item.type == 10) {
//return this.webBaseUrl + "/course/studyindex?id=" + item.id;