|
@@ -1,5 +1,5 @@
|
|
|
import { Icon, Swipe, SwipeItem, Tab, Tabs } from 'vant'
|
|
|
-import { defineComponent, onMounted, reactive, nextTick } from 'vue'
|
|
|
+import { defineComponent, onMounted, reactive, nextTick,onUnmounted } from 'vue'
|
|
|
import iconBack from './image/back.svg'
|
|
|
import styles from './index.module.less'
|
|
|
import Plyr from 'plyr'
|
|
@@ -53,9 +53,18 @@ export default defineComponent({
|
|
|
onMounted(() => {
|
|
|
getDetail()
|
|
|
})
|
|
|
+ // 返回
|
|
|
const goback = () => {
|
|
|
- history.go(-1)
|
|
|
+ postMessage({ api: 'back' })
|
|
|
}
|
|
|
+ onUnmounted(() => {
|
|
|
+ postMessage({
|
|
|
+ api: 'setRequestedOrientation',
|
|
|
+ content:{
|
|
|
+ orientation: 1
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
return () => (
|
|
|
<div class={styles.coursewarePlay}>
|
|
|
<div class={styles.backBtn} onClick={() => goback()}>
|