2024-12-05 10:57:08 +08:00
|
|
|
<template>
|
|
|
|
<view class="content">
|
2024-12-05 15:20:53 +08:00
|
|
|
<video id="coursewareVideo" :src="src"
|
2024-12-05 10:57:08 +08:00
|
|
|
controls autoplay="autoplay" style="width: 100%;"></video>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import {getPlatVideoPlay, loginVideoPlat} from "@/api";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
2024-12-05 15:20:53 +08:00
|
|
|
info: {},
|
|
|
|
src:''
|
2024-12-05 10:57:08 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad(options) {
|
|
|
|
this.info = options
|
|
|
|
this.fnInit()
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
fnInit(){
|
|
|
|
this.fnInitVideoPlat()
|
|
|
|
},
|
|
|
|
async fnInitVideoPlat(){
|
2024-12-05 15:20:53 +08:00
|
|
|
const resData = await getPlatVideoPlay({
|
|
|
|
serial: this.info.serial ,
|
|
|
|
code: this.info.code,
|
|
|
|
channel: 1,
|
|
|
|
})
|
|
|
|
this.src =resData.HLS
|
2024-12-05 10:57:08 +08:00
|
|
|
},
|
|
|
|
fnBack() {
|
|
|
|
uni.$u.route({
|
|
|
|
type: 'navigateBack'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.content {
|
|
|
|
background-color: #fff;
|
|
|
|
padding: 0 20upx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.button {
|
|
|
|
text-align: center;
|
|
|
|
margin-top: 40upx;
|
|
|
|
margin-bottom: 40upx;
|
|
|
|
|
|
|
|
button {
|
|
|
|
width: 70%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|