Browse Source

优化 播放

黄琪勇 11 months ago
parent
commit
d12fd0b3e7

+ 5 - 5
src/views/creation/index-share.tsx

@@ -366,8 +366,8 @@ export default defineComponent({
       try {
         const res = await api_openUserMusicDetail(state.id);
         if (res.code === 999) {
-          state.message = res.message;
-          state.messageStatus = true;
+          // 没有的时候显示缺省页
+          state.isEmpty = true
           return;
         } else {
           state.musicDetail = res.data;
@@ -385,10 +385,10 @@ export default defineComponent({
             initMediaPlay();
           });
 }
-      } catch (err) {
+      } catch (err:any) {
         // 没有的时候显示缺省页
-        state.isEmpty = true
-        state.listState.dataShow = false;
+        state.message = err;
+        state.messageStatus = true;
       }
     };
     // 滚动事件

+ 5 - 5
src/views/creation/index.module.less

@@ -178,7 +178,7 @@
 
 .musicSection {
   width: 100%;
-  min-height: calc(100vh - var(--barheight) - 20px - 14vh - 210px - 40px - 80px);
+  min-height: calc(100vh - var(--barheight) - 20px - 14vh - 210px - 55px - 80px);
   display: flex;
   flex-direction: column;
   justify-content: flex-end;
@@ -321,11 +321,11 @@
 }
 
 .upward{
+  padding-top: 12px;
   display: flex;
   justify-content: center;
-  align-items: center;
-  height: 40px;
-  background: linear-gradient( 180deg, rgba(20,39,85,0) 0%, #152956 26%, #1B3454 100%);
+  height: 55px;
+  background: linear-gradient( 180deg, rgba(20,39,85,0) 0%, rgba(24,46,85,0.77) 44%, #1B3454 100%);
   > img{
     width: 19px;
     height: 15px;
@@ -486,7 +486,7 @@
   }
 }
 .musicShareSection{
-  min-height: calc(100vh - var(--barheight) - 20vh - 210px - 40px);
+  min-height: calc(100vh - var(--barheight) - 20vh - 210px - 55px);
 }
 .likeShareItem{
   background-color: initial;

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

@@ -244,7 +244,12 @@ export default defineComponent({
       router.back()
     }
     //点击改变播放状态
-    function handlerClickPlay(){
+    function handlerClickPlay(event:MouseEvent){
+      // 原生 播放暂停按钮 点击的时候 不触发
+      // @ts-ignore
+      if(event.target?.matches('button.plyr__control')){
+        return
+      }
       if (_plrl.playing) {
         _plrl.pause();
       } else {