|
@@ -1,12 +1,16 @@
|
|
|
import { defineComponent, PropType } from 'vue'
|
|
|
import styles from './index.module.less'
|
|
|
-import { Icon, Image } from 'vant'
|
|
|
+import { Icon, Image, Popup } from 'vant'
|
|
|
import videoStop from '@common/images/icon_video_stop.png'
|
|
|
+import VideoList from './video-list'
|
|
|
+import request from '@/helpers/request'
|
|
|
|
|
|
interface IProps {
|
|
|
courseTime: string
|
|
|
coursePlan: string
|
|
|
videoPosterUrl?: string
|
|
|
+ roomUid?: string
|
|
|
+ liveState?: number
|
|
|
id?: number | string
|
|
|
}
|
|
|
|
|
@@ -23,9 +27,32 @@ export default defineComponent({
|
|
|
default: []
|
|
|
}
|
|
|
},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ videoStatus: false,
|
|
|
+ list: []
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
console.log(this.courseId, 'courseId 121212')
|
|
|
},
|
|
|
+ methods: {
|
|
|
+ async onLookVideo(item: any) {
|
|
|
+ // console.log(item)
|
|
|
+ try {
|
|
|
+ const res = await request.get('/api-student/liveRoomVideo/queryVideo', {
|
|
|
+ params: {
|
|
|
+ roomUid: item.roomUid
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(res)
|
|
|
+ this.list = res.data || []
|
|
|
+ this.videoStatus = true
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
render() {
|
|
|
return (
|
|
|
<div class={styles['col-steps']}>
|
|
@@ -53,7 +80,18 @@ export default defineComponent({
|
|
|
</div>
|
|
|
<div class={styles.stepContent}>
|
|
|
<p>{item.coursePlan}</p>
|
|
|
- {item.videoPosterUrl && (
|
|
|
+
|
|
|
+ {item.liveState === 2 && (
|
|
|
+ <div
|
|
|
+ class={styles.videoText}
|
|
|
+ onClick={() => {
|
|
|
+ this.onLookVideo(item)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 查看回放{'>>'}
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ {/* {item.videoPosterUrl && (
|
|
|
<div class={styles.videoImg}>
|
|
|
<Image src={item.videoPosterUrl} fit="cover" />
|
|
|
<Icon
|
|
@@ -62,7 +100,7 @@ export default defineComponent({
|
|
|
size={32}
|
|
|
/>
|
|
|
</div>
|
|
|
- )}
|
|
|
+ )} */}
|
|
|
</div>
|
|
|
</div>
|
|
|
)}
|
|
@@ -72,6 +110,15 @@ export default defineComponent({
|
|
|
</div>
|
|
|
))}
|
|
|
</div>
|
|
|
+
|
|
|
+ <Popup
|
|
|
+ v-model:show={this.videoStatus}
|
|
|
+ closeable
|
|
|
+ round
|
|
|
+ style={{ width: '90%' }}
|
|
|
+ >
|
|
|
+ {this.videoStatus && <VideoList list={this.list} />}
|
|
|
+ </Popup>
|
|
|
</div>
|
|
|
)
|
|
|
}
|