|
|
@@ -273,9 +273,11 @@
|
|
|
|
|
|
<selectTeachingClassDialog
|
|
|
ref="DialogRef" />
|
|
|
+ <iframe :src="courseUrl" class="courseIframe" v-if="courseUrl"></iframe>
|
|
|
|
|
|
</template>
|
|
|
<script setup>
|
|
|
+import { addOp3 } from '@/mixins/mixin'
|
|
|
import { ref, onMounted, watchEffect, inject } from 'vue';
|
|
|
import { userCurrentRole, userInfoStore, userCurrent,pageGotype } from '../../stores/counter'
|
|
|
// import JSZip from 'jszip';
|
|
|
@@ -477,6 +479,7 @@ const openCourseDetail = (id) => {
|
|
|
.then(res => {
|
|
|
console.log('openCourseDetail',res)
|
|
|
if (res.data[0].length > 0) {
|
|
|
+ return getCourseUrl(res.data[0][0])
|
|
|
// let isSave = res.value[0].filter(x => {
|
|
|
// return x.courseId == id
|
|
|
// })
|
|
|
@@ -502,33 +505,52 @@ const openCourseDetail = (id) => {
|
|
|
.catch(err => {
|
|
|
console.log(err)
|
|
|
})
|
|
|
- // 会返回复制得课程
|
|
|
- // top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/getcopyCourseByUseridSz", [id, user.user.userid], function (res) {
|
|
|
- // console.log(res)
|
|
|
- // if (res.value[0].length > 0) {
|
|
|
- // // let isSave = res.value[0].filter(x => {
|
|
|
- // // return x.courseId == id
|
|
|
- // // })
|
|
|
- // //这个是打开指定的课程接口
|
|
|
- // let url = '';
|
|
|
- // if (lang.lang == 'hk') {
|
|
|
- // url = "https://pbl.cocorobo.hk"
|
|
|
- // }else if (lang.lang == 'en') {
|
|
|
- // url = "https://pbl.cocorobo.com"
|
|
|
- // }else{
|
|
|
- // url = "https://pbl.cocorobo.cn"
|
|
|
- // }
|
|
|
- // // https://pbl.cocorobo.cn/pbl-student-table/dist/#/courseDetail?userid=0c3735c9-a2ef-11ef-9b30-005056b86db5&oid=414f2361-ad04-11ed-b13d-005056b86db5&org=0fec3a8a-ad04-11ed-b13d-005056b86db5&courseId=91886917-2f3b-11f1-bcd9-005056924926&tType=1&cid=&screenType=2
|
|
|
-
|
|
|
- // let url2 = `${url}/pbl-student-table/dist/#/courseDetail?userid=${user.user.userid}&oid=${user.user.organizeid}&org=${user.user.org}&courseId=${res.value[0][0].courseId}&tType=1&cid=&screenType=2`
|
|
|
- // // top.U.MD.D.I.openInApplication("studyDetail", res.value[0][0].courseId, 2, user.user.type);
|
|
|
- // top.U.MD.D.I.openInApplication('setUrl',{url:url2,title:'课程详情',id:new Date().getTime()})
|
|
|
- // } else {
|
|
|
- // updateCourseId(id, "studyDetail")
|
|
|
- // }
|
|
|
- // }, [], { "type": "POST", "withCredentials": true });
|
|
|
-
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+const courseUrl = ref('')
|
|
|
+ const getCourseUrl = (item) => {
|
|
|
+ // return console.log(item);
|
|
|
+
|
|
|
+ let _str = ""
|
|
|
+ if(item.state == 1){
|
|
|
+ _str = "course_stageMode_open"
|
|
|
+ }if(item.state == 2){
|
|
|
+ _str = "course_taskMode_open"
|
|
|
+ }if(item.state == 3){
|
|
|
+ _str = "course_easyMode_open"
|
|
|
+ }if(item.state == 5){
|
|
|
+ _str = "course_aiMode_open"
|
|
|
+ }if(item.state == 6){
|
|
|
+ _str = "course_aiEasyMode_open"
|
|
|
+ }if(item.state == 7){
|
|
|
+ _str = "course_pptMode_open"
|
|
|
+ }
|
|
|
+ addOp3('1', "", { courseid: item.courseId, type: _str }, "success")
|
|
|
+
|
|
|
+ // window.topU.postMessage({ cid: item.courseId, screenType: "3" }, "*");
|
|
|
+ // let url = 'https://beta.pbl.cocorobo.cn'
|
|
|
+ // if (window.location.href.includes('beta')) {
|
|
|
+ // url = url
|
|
|
+ // }else if (lang.lang === 'cn') {
|
|
|
+ // url = 'https://pbl.cocorobo.cn'
|
|
|
+ // }else if (lang.lang === 'hk') {
|
|
|
+ // url = 'https://pbl.cocorobo.hk'
|
|
|
+ // }else if (lang.lang === 'en') {
|
|
|
+ // url = 'https://pbl.cocorobo.com'
|
|
|
+ // }
|
|
|
+ let url = '';
|
|
|
+ if (lang.lang == 'hk') {
|
|
|
+ url = "https://pbl.cocorobo.hk"
|
|
|
+ }else if (lang.lang == 'en') {
|
|
|
+ url = "https://pbl.cocorobo.com"
|
|
|
+ }else{
|
|
|
+ url = "https://pbl.cocorobo.cn"
|
|
|
+ }
|
|
|
+ let url2 = `${url}/pbl-student-table/dist/#/courseDetail?userid=${user.user.userid}&oid=${user.user.organizeid}&org=${user.user.org}&courseId=${item.courseId}&tType=1&cid=&screenType=2`
|
|
|
+
|
|
|
+ courseUrl.value = url2
|
|
|
+ }
|
|
|
const getTimeCourse = (id, item) => {
|
|
|
if (setIntervalNum.value) {
|
|
|
clearInterval(setIntervalNum.value)
|
|
|
@@ -575,21 +597,6 @@ const getTimeCourse = (id, item) => {
|
|
|
})
|
|
|
}, interValtTime);
|
|
|
}
|
|
|
-// const updateCourse = (id, item) => {
|
|
|
-// // 会返回courseId和state 两个参数 然后打开
|
|
|
-// getTimeCourse(id, item)
|
|
|
-// top.U.A.Request("https://pbl.cocorobo.cn/api/pbl/getcopyCourseByUseridSz", [id, user.user.userid], function (res) {
|
|
|
-// console.log(res)
|
|
|
-// if (res.value[0].length > 0) {
|
|
|
-// // let isSave = res.value[0].filter(x => {
|
|
|
-// // return x.courseId == id
|
|
|
-// // })
|
|
|
-// top.U.MD.D.I.openInApplication('openCourseNewUpdate', res.value[0][0].courseId); //这个是打开指定的课程接口
|
|
|
-// } else {
|
|
|
-// updateCourseId(id, "openCourseNewUpdate")
|
|
|
-// }
|
|
|
-// }, [], { "type": "POST", "withCredentials": true });
|
|
|
-// }
|
|
|
|
|
|
const updateCourseId = (id, type) => {
|
|
|
axios.post('https://pbl.cocorobo.cn/api/pbl/copyCourseSz', {id: id +','+ user.user.userid}, {
|
|
|
@@ -1023,4 +1030,13 @@ watchEffect(() => {
|
|
|
.grandTitle3{
|
|
|
margin-top: 0;
|
|
|
}
|
|
|
+.courseIframe{
|
|
|
+ width: 100vw;
|
|
|
+ height: 100vh;
|
|
|
+ position: fixed;
|
|
|
+ z-index: 99999;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ border: none;
|
|
|
+}
|
|
|
</style>
|