|  | @@ -1,5 +1,5 @@
 | 
	
		
			
				|  |  |  import { Icon, Swipe, SwipeItem, Tab, Tabs } from 'vant'
 | 
	
		
			
				|  |  | -import { defineComponent, onMounted, reactive, nextTick, onUnmounted } from 'vue'
 | 
	
		
			
				|  |  | +import { defineComponent, onMounted, reactive, nextTick, onUnmounted, ref } from 'vue'
 | 
	
		
			
				|  |  |  import iconBack from './image/back.svg'
 | 
	
		
			
				|  |  |  import styles from './index.module.less'
 | 
	
		
			
				|  |  |  import Plyr from 'plyr'
 | 
	
	
		
			
				|  | @@ -8,10 +8,12 @@ import request from '@/helpers/request'
 | 
	
		
			
				|  |  |  import { state } from '@/state'
 | 
	
		
			
				|  |  |  import { useRoute } from 'vue-router'
 | 
	
		
			
				|  |  |  import { postMessage } from '@/helpers/native-message'
 | 
	
		
			
				|  |  | +import OHeader from '@/components/o-header'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default defineComponent({
 | 
	
		
			
				|  |  |    name: 'CoursewarePlay',
 | 
	
		
			
				|  |  |    setup() {
 | 
	
		
			
				|  |  | +    const navBarHeight = ref(0)
 | 
	
		
			
				|  |  |      const handleInit = () => {
 | 
	
		
			
				|  |  |        postMessage({
 | 
	
		
			
				|  |  |          api: 'setRequestedOrientation',
 | 
	
	
		
			
				|  | @@ -25,6 +27,22 @@ export default defineComponent({
 | 
	
		
			
				|  |  |            status: 0
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  | +      const sTitleHeight = sessionStorage.getItem('titleHeight')
 | 
	
		
			
				|  |  | +      if (sTitleHeight) {
 | 
	
		
			
				|  |  | +        navBarHeight.value = Number(sTitleHeight)
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        postMessage({ api: 'getNavHeight' }, (res) => {
 | 
	
		
			
				|  |  | +          const { content } = res as any
 | 
	
		
			
				|  |  | +          console.log("🚀 ~ content", content)
 | 
	
		
			
				|  |  | +          const dpi = content.dpi || 2
 | 
	
		
			
				|  |  | +          if (content.titleHeight) {
 | 
	
		
			
				|  |  | +            // 导航栏的高度
 | 
	
		
			
				|  |  | +            const titleHeight = content.titleHeight / dpi
 | 
	
		
			
				|  |  | +            sessionStorage.setItem('titleHeight', String(titleHeight))
 | 
	
		
			
				|  |  | +            navBarHeight.value = titleHeight
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      handleInit()
 | 
	
		
			
				|  |  |      const route = useRoute()
 | 
	
	
		
			
				|  | @@ -82,6 +100,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  |      return () => (
 | 
	
		
			
				|  |  |        <div class={styles.coursewarePlay}>
 | 
	
		
			
				|  |  | +        <OHeader />
 | 
	
		
			
				|  |  |          <div class={styles.backBtn} onClick={() => goback()}>
 | 
	
		
			
				|  |  |            <Icon name={iconBack} />
 | 
	
		
			
				|  |  |            返回
 |