|
@@ -2,7 +2,7 @@ import OEmpty from '@/components/o-empty'
|
|
|
import OHeader from '@/components/o-header'
|
|
|
import request from '@/helpers/request'
|
|
|
import { state } from '@/state'
|
|
|
-import { Cell, CellGroup, Image, Popup } from 'vant'
|
|
|
+import { Button, Cell, CellGroup, Image, Popup } from 'vant'
|
|
|
import { defineComponent, onMounted, reactive, ref } from 'vue'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
import Guide from './guide'
|
|
@@ -13,8 +13,9 @@ export default defineComponent({
|
|
|
name: 'screen-projection',
|
|
|
setup(props, { emit }) {
|
|
|
const icons = {
|
|
|
- music: getImage('icon-music.png'),
|
|
|
- video: getImage('icon-video.png')
|
|
|
+ SONG: getImage('icon-music.png'),
|
|
|
+ VIDEO: getImage('icon-video.png'),
|
|
|
+ IMG: getImage('icon-img.png')
|
|
|
}
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
@@ -47,18 +48,18 @@ export default defineComponent({
|
|
|
})
|
|
|
|
|
|
// 去课时播放
|
|
|
- const hanldeOpenPlay = (n: any) => {
|
|
|
+ const hanldeOpenPlay = (n?: any) => {
|
|
|
router.push({
|
|
|
path: '/coursewarePlay',
|
|
|
query: {
|
|
|
...query,
|
|
|
id: query.lessonCoursewareDetailId,
|
|
|
- kId: n.id
|
|
|
+ kId: n?.id
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
return () => (
|
|
|
- <div>
|
|
|
+ <div class={styles.screenProjection}>
|
|
|
<OHeader
|
|
|
desotry={false}
|
|
|
rightText="投屏帮助"
|
|
@@ -67,7 +68,7 @@ export default defineComponent({
|
|
|
data.guideOpen = true
|
|
|
}}
|
|
|
/>
|
|
|
- <div>
|
|
|
+ <div class={styles.container}>
|
|
|
{data.name && (
|
|
|
<div class={styles.tips}>
|
|
|
<div class={styles.line}></div>
|
|
@@ -75,20 +76,6 @@ export default defineComponent({
|
|
|
</div>
|
|
|
)}
|
|
|
<CellGroup inset>
|
|
|
- {/* <Cell
|
|
|
- title="胜强测试"
|
|
|
- isLink
|
|
|
- center
|
|
|
- onClick={() => {
|
|
|
- location.href = `http://192.168.3.114:1000/#/coursewarePlay?id=${query.lessonCoursewareDetailId}&courseId=${query.courseId}`
|
|
|
- }}
|
|
|
- >
|
|
|
- {{
|
|
|
- icon: () => (
|
|
|
- <Image style={{ marginRight: '12px' }} width={36} height={36} src={icons.music} />
|
|
|
- )
|
|
|
- }}
|
|
|
- </Cell> */}
|
|
|
{data.knowledgePointList.map((item: any) => {
|
|
|
return (
|
|
|
<>
|
|
@@ -102,7 +89,7 @@ export default defineComponent({
|
|
|
style={{ marginRight: '12px' }}
|
|
|
width={36}
|
|
|
height={36}
|
|
|
- src={['VIDEO', 'IMG'].includes(n.type) ? icons.video : icons.music}
|
|
|
+ src={icons[n.type]}
|
|
|
/>
|
|
|
)
|
|
|
}}
|
|
@@ -116,6 +103,9 @@ export default defineComponent({
|
|
|
</div>
|
|
|
{!data.loading && !data.knowledgePointList.length && <OEmpty />}
|
|
|
|
|
|
+ <Button class={styles.playBtn} block type="primary" round onClick={() => hanldeOpenPlay()}>
|
|
|
+ 播放课件
|
|
|
+ </Button>
|
|
|
<Popup
|
|
|
v-model:show={data.guideOpen}
|
|
|
position="right"
|