|
@@ -114,6 +114,7 @@
|
|
|
"
|
|
|
v-model="whitePenShow"
|
|
|
/>
|
|
|
+ <practiceForm v-model="isPracticeShow" :practiceUrl="practiceUrl" @close="handlePracticeClose" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -129,6 +130,7 @@ import { ElMessageBox } from "element-plus"
|
|
|
import courseCollapse from "./components/courseCollapse"
|
|
|
import pen from "./components/pen"
|
|
|
import playRecordTime from "./components/playRecordTime"
|
|
|
+import practiceForm from "./components/practiceForm"
|
|
|
import useDialogConfirm from "@/hooks/useDialogConfirm"
|
|
|
import { getRecentCourseSchedule_gym } from "@/api/homePage.api"
|
|
|
import { getToken } from "@/libs/auth"
|
|
@@ -403,6 +405,8 @@ const activeCoursewareResourceId = computed<string | undefined>(() => {
|
|
|
const materialRefs = activeCourseware.value?.materialRefs
|
|
|
return materialRefs ? (["GYM", "KLX"].includes(userStoreHook.roles!) ? materialRefs[0]?.resourceIdStr : materialRefs[0]?.resourceId) : undefined
|
|
|
})
|
|
|
+const isPracticeShow = ref(false)
|
|
|
+const practiceUrl = ref("")
|
|
|
function handleGoPracticeBtn(activeCoursewareResourceId: string) {
|
|
|
// GYM,GYT,KLX 区分 云教练
|
|
|
const urlObj = {
|
|
@@ -410,7 +414,13 @@ function handleGoPracticeBtn(activeCoursewareResourceId: string) {
|
|
|
GYM: `${URL_TEACH_GYM}#/detail/${activeCoursewareResourceId}?Authorization=${getToken()}&platform=web&liveConfig=1&isYjt=1`,
|
|
|
KLX: `${URL_TEACH_KLX}??Authorization=${getToken()}&id=${activeCoursewareResourceId}&limitModel=practice&isYjt=1`
|
|
|
}
|
|
|
- window.open(urlObj[userStoreHook.roles!], "_blank")
|
|
|
+ isPracticeShow.value = true
|
|
|
+ practiceUrl.value = urlObj[userStoreHook.roles!]
|
|
|
+ //window.open(urlObj[userStoreHook.roles!], "_blank")
|
|
|
+}
|
|
|
+function handlePracticeClose() {
|
|
|
+ isPracticeShow.value = false
|
|
|
+ practiceUrl.value = ""
|
|
|
}
|
|
|
</script>
|
|
|
|