|
@@ -1,5 +1,5 @@
|
|
import { Icon, Swipe, SwipeItem, Tab, Tabs } from 'vant'
|
|
import { Icon, Swipe, SwipeItem, Tab, Tabs } from 'vant'
|
|
-import { defineComponent, onMounted, reactive, nextTick,onUnmounted } from 'vue'
|
|
|
|
|
|
+import { defineComponent, onMounted, reactive, nextTick, onUnmounted } from 'vue'
|
|
import iconBack from './image/back.svg'
|
|
import iconBack from './image/back.svg'
|
|
import styles from './index.module.less'
|
|
import styles from './index.module.less'
|
|
import Plyr from 'plyr'
|
|
import Plyr from 'plyr'
|
|
@@ -12,12 +12,21 @@ import { postMessage } from '@/helpers/native-message'
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: 'CoursewarePlay',
|
|
name: 'CoursewarePlay',
|
|
setup() {
|
|
setup() {
|
|
- postMessage({
|
|
|
|
- api: 'setRequestedOrientation',
|
|
|
|
- content:{
|
|
|
|
- orientation: 0
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ const handleInit = () => {
|
|
|
|
+ postMessage({
|
|
|
|
+ api: 'setRequestedOrientation',
|
|
|
|
+ content: {
|
|
|
|
+ orientation: 0
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ postMessage({
|
|
|
|
+ api: 'setBarStatus',
|
|
|
|
+ content: {
|
|
|
|
+ status: 0
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ handleInit()
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
const data = reactive({
|
|
const data = reactive({
|
|
detail: null,
|
|
detail: null,
|
|
@@ -60,10 +69,16 @@ export default defineComponent({
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
postMessage({
|
|
postMessage({
|
|
api: 'setRequestedOrientation',
|
|
api: 'setRequestedOrientation',
|
|
- content:{
|
|
|
|
|
|
+ content: {
|
|
orientation: 1
|
|
orientation: 1
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ postMessage({
|
|
|
|
+ api: 'setBarStatus',
|
|
|
|
+ content: {
|
|
|
|
+ status: 1
|
|
|
|
+ }
|
|
|
|
+ })
|
|
})
|
|
})
|
|
return () => (
|
|
return () => (
|
|
<div class={styles.coursewarePlay}>
|
|
<div class={styles.coursewarePlay}>
|