Parcourir la source

Merge branch 'hqyDev' of http://git.dayaedu.com/liushengqiang/classroom-app into online

黄琪勇 il y a 8 mois
Parent
commit
729a1d75f1
1 fichiers modifiés avec 19 ajouts et 3 suppressions
  1. 19 3
      src/views/creation/index-share.tsx

+ 19 - 3
src/views/creation/index-share.tsx

@@ -5,7 +5,8 @@ import {
   reactive,
   ref,
   watch,
-  nextTick
+  nextTick,
+  onBeforeMount
 } from 'vue';
 // import WaveSurfer from 'wavesurfer.js';
 // import Regions from 'wavesurfer.js/dist/plugins/regions.js';
@@ -538,8 +539,18 @@ export default defineComponent({
     function setFullHeight(){
       creationHeight.value = window.innerHeight
     }
+    onBeforeMount(() => {
+      if(isApp) {
+        postMessage({
+          api: "setRequestedOrientation",
+          content: {
+            orientation: 1,
+          },
+        });
+        setStatusBarTextColor(true)
+      }
+    })
     onMounted(async () => {
-      if(isApp) { setStatusBarTextColor(true) }
       __init();
       setFullHeight()
       window.addEventListener('resize', setFullHeight)
@@ -599,7 +610,12 @@ export default defineComponent({
                   border={false}
                   isBack={route.query.platformType != 'ANALYSIS'}
                   title={"作品详情"}
-                  onLeftClick={()=>{ setStatusBarTextColor(false) }}
+                  onLeftClick={()=>{
+                    setStatusBarTextColor(false)
+                    postMessage({
+                      api: 'back'
+                    });
+                  }}
                 />
                 : <div class={styles.logoDownload}>
                     <img src={isScreenScroll.value ? logo1Img : logoImg} class={styles.logoImg}></img>