Parcourir la source

修复横竖屏切换问题

黄琪勇 il y a 11 mois
Parent
commit
ca22a910b0

+ 6 - 2
src/views/creation/index-share.tsx

@@ -358,8 +358,12 @@ export default defineComponent({
         if (api === 'api_musicPage') {
           staffState.isShow = true
           staffState.height = height + "px"
-          // 如果是播放中自动开始 播放
-          if(playProgressData.playState) handlerClickPlay()
+          // 如果是播放中自动开始播放  不是播放 自动跳转到当前位置
+          if(playProgressData.playState){
+            handlerClickPlay()
+          }else{
+            updateProgressStaff(state._plrl.currentTime)
+          }
         }
       });
     }

+ 1 - 0
src/views/creation/index.module.less

@@ -3,6 +3,7 @@
   z-index: -1;
   width: 100vw;
   height: var(--creationHeight, 100vh);
+  min-height: 100vh;
   top: 0;
   left: 0;
   background: url("./images/bg.png") no-repeat;

+ 6 - 2
src/views/creation/index.tsx

@@ -383,8 +383,12 @@ export default defineComponent({
         if (api === 'api_musicPage') {
           staffState.isShow = true
           staffState.height = height + "px"
-          // 如果是播放中自动开始 播放
-          if(playProgressData.playState) handlerClickPlay()
+          // 如果是播放中自动开始播放  不是播放 自动跳转到当前位置
+          if(playProgressData.playState){
+            handlerClickPlay()
+          }else{
+            updateProgressStaff(state._plrl.currentTime)
+          }
         }
       });
     }

+ 6 - 2
src/views/creation/playCreation/index.tsx

@@ -318,8 +318,12 @@ export default defineComponent({
         if (api === 'api_musicPage') {
           staffState.isShow = true
           staffState.height = height + "px"
-          // 如果是播放中自动开始 播放
-          if(playProgressData.playState) handlerClickPlay()
+          // 如果是播放中自动开始播放  不是播放 自动跳转到当前位置
+          if(playProgressData.playState){
+            handlerClickPlay()
+          }else{
+            updateProgressStaff(_plrl.currentTime)
+          }
         }
       });
     }