|  | @@ -40,8 +40,7 @@ import { setLogout } from '@/state';
 | 
	
		
			
				|  |  |  import { storage } from '@/helpers/storage';
 | 
	
		
			
				|  |  |  import { ACCESS_TOKEN } from '@/store/mutation-types';
 | 
	
		
			
				|  |  |  import MWxTip from '@/components/m-wx-tip';
 | 
	
		
			
				|  |  | -import { usePageVisibility, useEventListener } from '@vant/use';
 | 
	
		
			
				|  |  | -import videoBg from './images/video-bg.png';
 | 
	
		
			
				|  |  | +import { usePageVisibility, useEventListener, useWindowSize } from '@vant/use';
 | 
	
		
			
				|  |  |  import LoginChangeModel from './login-change-model';
 | 
	
		
			
				|  |  |  import MSticky from '@/components/m-sticky';
 | 
	
		
			
				|  |  |  import "plyr/dist/plyr.css";
 | 
	
	
		
			
				|  | @@ -51,8 +50,10 @@ import audioBga from "./images/audioBga.json";
 | 
	
		
			
				|  |  |  import audioBga1 from "./images/leftCloud.json";
 | 
	
		
			
				|  |  |  import audioBga2 from "./images/rightCloud.json";
 | 
	
		
			
				|  |  |  import videobg from "./images/videobg.png";
 | 
	
		
			
				|  |  | +import btnImg from './images/btn.png';
 | 
	
		
			
				|  |  |  import audioVisualDraw from "./audioVisualDraw"
 | 
	
		
			
				|  |  |  import playProgressData from "./playCreation/playProgress"
 | 
	
		
			
				|  |  | +import Loading from './loading';
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default defineComponent({
 | 
	
		
			
				|  |  |    name: 'creation-detail',
 | 
	
	
		
			
				|  | @@ -82,7 +83,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        params: {
 | 
	
		
			
				|  |  |          page: 1,
 | 
	
		
			
				|  |  | -        rows: 20
 | 
	
		
			
				|  |  | +        rows: 4
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        messageStatus: false,
 | 
	
		
			
				|  |  |        message: '',
 | 
	
	
		
			
				|  | @@ -151,7 +152,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          if (state.list.length > 0 && result.current === 1) {
 | 
	
		
			
				|  |  |            return;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        state.list = state.list.concat(result.rows || []);
 | 
	
		
			
				|  |  | +        state.list = result.rows || [];
 | 
	
		
			
				|  |  |          state.listState.finished = result.current >= result.pages;
 | 
	
		
			
				|  |  |          state.params.page = result.current + 1;
 | 
	
		
			
				|  |  |          state.listState.dataShow = state.list.length > 0;
 | 
	
	
		
			
				|  | @@ -185,7 +186,6 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        player.on('loadedmetadata', () => {
 | 
	
		
			
				|  |  |          plyrState.loaded = true
 | 
	
		
			
				|  |  |          player.currentTime = playProgressData.playProgress
 | 
	
		
			
				|  |  | -        if(playProgressData.playState) handlerClickPlay()
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |        player.on("timeupdate", ()=>{
 | 
	
		
			
				|  |  |          plyrState.currentTime = player.currentTime
 | 
	
	
		
			
				|  | @@ -228,15 +228,15 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          const canvasDom = document.querySelector("#audioVisualizer") as HTMLCanvasElement
 | 
	
		
			
				|  |  |          const { pauseVisualDraw, playVisualDraw } = audioVisualDraw(audioDom, canvasDom)
 | 
	
		
			
				|  |  |          player.on('play', () => {
 | 
	
		
			
				|  |  | -          lottieDom.value.play()
 | 
	
		
			
				|  |  | -          lottieDom1.value.play()
 | 
	
		
			
				|  |  | -          lottieDom2.value.play()
 | 
	
		
			
				|  |  | +          lottieDom.value?.play()
 | 
	
		
			
				|  |  | +          lottieDom1.value?.play()
 | 
	
		
			
				|  |  | +          lottieDom2.value?.play()
 | 
	
		
			
				|  |  |            playVisualDraw()
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |          player.on('pause', () => {
 | 
	
		
			
				|  |  | -          lottieDom.value.pause()
 | 
	
		
			
				|  |  | -          lottieDom1.value.pause()
 | 
	
		
			
				|  |  | -          lottieDom2.value.pause()
 | 
	
		
			
				|  |  | +          lottieDom.value?.pause()
 | 
	
		
			
				|  |  | +          lottieDom1.value?.pause()
 | 
	
		
			
				|  |  | +          lottieDom2.value?.pause()
 | 
	
		
			
				|  |  |            pauseVisualDraw()
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |        }
 | 
	
	
		
			
				|  | @@ -254,7 +254,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          path:"/playCreation",
 | 
	
		
			
				|  |  |          query:{
 | 
	
		
			
				|  |  |            resourceUrl:encodeURIComponent(state.musicDetail?.videoUrl),
 | 
	
		
			
				|  |  | -          videoBgUrl:encodeURIComponent(state.musicDetail?.videoImg),
 | 
	
		
			
				|  |  | +          videoBgUrl:encodeURIComponent(state.musicDetail?.videoImg || ""),
 | 
	
		
			
				|  |  |            musicSheetName:encodeURIComponent(state.musicDetail?.musicSheetName),
 | 
	
		
			
				|  |  |            username:encodeURIComponent(state.musicDetail?.username),
 | 
	
		
			
				|  |  |            musicSheetId:encodeURIComponent(state.musicDetail?.musicSheetId),
 | 
	
	
		
			
				|  | @@ -326,7 +326,6 @@ export default defineComponent({
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |      // 滚动事件
 | 
	
		
			
				|  |  |      const cleanScrollEvent = useEventListener('scroll', () => {
 | 
	
		
			
				|  |  | -      creationHeight.value = window.innerHeight
 | 
	
		
			
				|  |  |        const height =
 | 
	
		
			
				|  |  |          window.scrollY ||
 | 
	
		
			
				|  |  |          document.documentElement.scrollTop
 | 
	
	
		
			
				|  | @@ -359,9 +358,11 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          if (api === 'api_musicPage') {
 | 
	
		
			
				|  |  |            staffState.isShow = true
 | 
	
		
			
				|  |  |            staffState.height = height + "px"
 | 
	
		
			
				|  |  | -          // 如果是播放中自动开始 播放
 | 
	
		
			
				|  |  | -          if(state._plrl.playing){
 | 
	
		
			
				|  |  | -            playStaff()
 | 
	
		
			
				|  |  | +          // 如果是播放中自动开始播放  不是播放 自动跳转到当前位置
 | 
	
		
			
				|  |  | +          if(playProgressData.playState){
 | 
	
		
			
				|  |  | +            handlerClickPlay()
 | 
	
		
			
				|  |  | +          }else{
 | 
	
		
			
				|  |  | +            updateProgressStaff(state._plrl.currentTime)
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        });
 | 
	
	
		
			
				|  | @@ -426,12 +427,17 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          updateProgressStaff
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +    function setFullHeight(){
 | 
	
		
			
				|  |  | +      creationHeight.value = window.innerHeight
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |      onMounted(async () => {
 | 
	
		
			
				|  |  |        __init();
 | 
	
		
			
				|  |  | +      window.addEventListener('resize', setFullHeight)
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      onUnmounted(() => {
 | 
	
		
			
				|  |  |        cleanScrollEvent()
 | 
	
		
			
				|  |  | +      window.removeEventListener('resize', setFullHeight)
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      onBeforeRouteUpdate((to: any) => {
 | 
	
	
		
			
				|  | @@ -443,6 +449,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        if(state._plrl){
 | 
	
		
			
				|  |  |          state._plrl.destroy()
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | +      plyrState.playIngShow = true
 | 
	
		
			
				|  |  |        staffState.staffSrc = ""
 | 
	
		
			
				|  |  |        staffState.isShow = false
 | 
	
		
			
				|  |  |        staffState.height = "initial"
 | 
	
	
		
			
				|  | @@ -459,7 +466,8 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        <div
 | 
	
		
			
				|  |  |          style={
 | 
	
		
			
				|  |  |            {
 | 
	
		
			
				|  |  | -            '--barheight':state.heightV + "px"
 | 
	
		
			
				|  |  | +            '--barheight':state.heightV + "px",
 | 
	
		
			
				|  |  | +            "--creationHeight":creationHeight.value ? creationHeight.value+"px" : "100vh"
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          class={[
 | 
	
	
		
			
				|  | @@ -467,7 +475,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |            browser().isTablet ? styles.creationTablet : '',
 | 
	
		
			
				|  |  |            isScreenScroll.value && styles.isShareScreenScroll
 | 
	
		
			
				|  |  |          ]}>
 | 
	
		
			
				|  |  | -        <div style={ creationHeight.value ? {"--creationHeight":creationHeight.value + "px"} : {}} class={styles.creationBg}></div>
 | 
	
		
			
				|  |  | +        <div class={styles.creationBg}></div>
 | 
	
		
			
				|  |  |          <MSticky position="top"
 | 
	
		
			
				|  |  |            onBarHeight={(height: any) => {
 | 
	
		
			
				|  |  |              console.log(height, 'height', height)
 | 
	
	
		
			
				|  | @@ -588,55 +596,63 @@ export default defineComponent({
 | 
	
		
			
				|  |  |              <div class={styles.likeSection}>
 | 
	
		
			
				|  |  |                <div class={styles.likeTitle}>推荐作品</div>
 | 
	
		
			
				|  |  |                {state.listState.dataShow ? (
 | 
	
		
			
				|  |  | -                <List
 | 
	
		
			
				|  |  | -                  finished={state.listState.finished}
 | 
	
		
			
				|  |  | -                  finishedText=" "
 | 
	
		
			
				|  |  | -                  class={[styles.container, styles.containerInformation]}
 | 
	
		
			
				|  |  | -                  onLoad={getList}
 | 
	
		
			
				|  |  | -                  immediateCheck={false}>
 | 
	
		
			
				|  |  | -                  {state.list.map((item: any, index: number) => (
 | 
	
		
			
				|  |  | -                    <Cell
 | 
	
		
			
				|  |  | -                      class={[styles.likeShareItem, index===state.list.length-1&&styles.likeShareItemLast]}
 | 
	
		
			
				|  |  | -                      border={false}
 | 
	
		
			
				|  |  | -                      onClick={() => onDetail(item)}
 | 
	
		
			
				|  |  | -                    >
 | 
	
		
			
				|  |  | -                      {{
 | 
	
		
			
				|  |  | -                        icon: () => (
 | 
	
		
			
				|  |  | -                          <div class={styles.audioImgBox}>
 | 
	
		
			
				|  |  | -                            <img
 | 
	
		
			
				|  |  | -                              src={audioPan}
 | 
	
		
			
				|  |  | -                              class={styles.audioPan}
 | 
	
		
			
				|  |  | -                              crossorigin="anonymous"
 | 
	
		
			
				|  |  | -                            />
 | 
	
		
			
				|  |  | -                            <img
 | 
	
		
			
				|  |  | -                              src={
 | 
	
		
			
				|  |  | -                                item.img || musicBg
 | 
	
		
			
				|  |  | -                              }
 | 
	
		
			
				|  |  | -                              class={styles.muploader}
 | 
	
		
			
				|  |  | -                              crossorigin="anonymous"
 | 
	
		
			
				|  |  | -                            />
 | 
	
		
			
				|  |  | -                            <img class={styles.imgLabel} src={item.videoUrl?.lastIndexOf('mp4') !== -1 ? videoLabel : audioLabel} />
 | 
	
		
			
				|  |  | -                          </div>
 | 
	
		
			
				|  |  | -                        ),
 | 
	
		
			
				|  |  | -                        title: () => (
 | 
	
		
			
				|  |  | -                          <div class={styles.userInfo}>
 | 
	
		
			
				|  |  | -                            <div class={[styles.musicSheetName,'van-ellipsis']}>{item.musicSheetName}</div>
 | 
	
		
			
				|  |  | -                            <div class={styles.usernameCon}>
 | 
	
		
			
				|  |  | -                              <div class={styles.likeNum}>
 | 
	
		
			
				|  |  | -                                <img src={iconZanActive} />
 | 
	
		
			
				|  |  | -                                <span>{item.likeNum}</span>
 | 
	
		
			
				|  |  | +                <>
 | 
	
		
			
				|  |  | +                  <List
 | 
	
		
			
				|  |  | +                    finished={true}
 | 
	
		
			
				|  |  | +                    finishedText=" "
 | 
	
		
			
				|  |  | +                    class={[styles.container, styles.containerInformation]}
 | 
	
		
			
				|  |  | +                    //onLoad={getList}
 | 
	
		
			
				|  |  | +                    immediateCheck={false}>
 | 
	
		
			
				|  |  | +                    {state.list.map((item: any, index:number) => (
 | 
	
		
			
				|  |  | +                      <Cell
 | 
	
		
			
				|  |  | +                        class={[styles.likeShareItem, index===state.list.length-1&&styles.likeShareItemLast]}
 | 
	
		
			
				|  |  | +                        border={false}
 | 
	
		
			
				|  |  | +                        onClick={() => onDetail(item)}
 | 
	
		
			
				|  |  | +                      >
 | 
	
		
			
				|  |  | +                        {{
 | 
	
		
			
				|  |  | +                          icon: () => (
 | 
	
		
			
				|  |  | +                            <div class={styles.audioImgBox}>
 | 
	
		
			
				|  |  | +                              <img
 | 
	
		
			
				|  |  | +                                src={audioPan}
 | 
	
		
			
				|  |  | +                                class={styles.audioPan}
 | 
	
		
			
				|  |  | +                                crossorigin="anonymous"
 | 
	
		
			
				|  |  | +                              />
 | 
	
		
			
				|  |  | +                              <img
 | 
	
		
			
				|  |  | +                                src={
 | 
	
		
			
				|  |  | +                                  item.img || musicBg
 | 
	
		
			
				|  |  | +                                }
 | 
	
		
			
				|  |  | +                                class={styles.muploader}
 | 
	
		
			
				|  |  | +                                crossorigin="anonymous"
 | 
	
		
			
				|  |  | +                              />
 | 
	
		
			
				|  |  | +                              <img class={styles.imgLabel} src={item.videoUrl?.lastIndexOf('mp4') !== -1 ? videoLabel : audioLabel} />
 | 
	
		
			
				|  |  | +                            </div>
 | 
	
		
			
				|  |  | +                          ),
 | 
	
		
			
				|  |  | +                          title: () => (
 | 
	
		
			
				|  |  | +                            <div class={styles.userInfo}>
 | 
	
		
			
				|  |  | +                              <div class={[styles.musicSheetName,'van-ellipsis']}>{item.musicSheetName}</div>
 | 
	
		
			
				|  |  | +                              <div class={styles.usernameCon}>
 | 
	
		
			
				|  |  | +                                <div class={styles.likeNum}>
 | 
	
		
			
				|  |  | +                                  <img src={iconZanActive} />
 | 
	
		
			
				|  |  | +                                  <span>{item.likeNum}</span>
 | 
	
		
			
				|  |  | +                                </div>
 | 
	
		
			
				|  |  | +                                <div class={styles.username}>{item.username}</div>
 | 
	
		
			
				|  |  |                                </div>
 | 
	
		
			
				|  |  | -                              <div class={styles.username}>{item.username}</div>
 | 
	
		
			
				|  |  |                              </div>
 | 
	
		
			
				|  |  | -                          </div>
 | 
	
		
			
				|  |  | -                        ),
 | 
	
		
			
				|  |  | -                        value: () => (
 | 
	
		
			
				|  |  | -                          <img src={playImg} class={styles.playImg} />
 | 
	
		
			
				|  |  | -                        )
 | 
	
		
			
				|  |  | -                      }}
 | 
	
		
			
				|  |  | -                    </Cell>
 | 
	
		
			
				|  |  | -                  ))}
 | 
	
		
			
				|  |  | -                </List>
 | 
	
		
			
				|  |  | +                          ),
 | 
	
		
			
				|  |  | +                          value: () => (
 | 
	
		
			
				|  |  | +                            <img src={playImg} class={styles.playImg} />
 | 
	
		
			
				|  |  | +                          )
 | 
	
		
			
				|  |  | +                        }}
 | 
	
		
			
				|  |  | +                      </Cell>
 | 
	
		
			
				|  |  | +                    ))}
 | 
	
		
			
				|  |  | +                  </List>
 | 
	
		
			
				|  |  | +                  {
 | 
	
		
			
				|  |  | +                    !state.listState.finished &&
 | 
	
		
			
				|  |  | +                      <div class={styles.btnImg}>
 | 
	
		
			
				|  |  | +                        <img onClick={getList} src={btnImg} />
 | 
	
		
			
				|  |  | +                    </div>
 | 
	
		
			
				|  |  | +                  }
 | 
	
		
			
				|  |  | +                </>
 | 
	
		
			
				|  |  |                ) : (
 | 
	
		
			
				|  |  |                  <MEmpty image={"empty2"} description="暂无作品" />
 | 
	
		
			
				|  |  |                )}
 | 
	
	
		
			
				|  | @@ -655,7 +671,6 @@ export default defineComponent({
 | 
	
		
			
				|  |  |            v-model:show={state.loginStatus}
 | 
	
		
			
				|  |  |            style={{ background: 'transparent', overflow: 'inherit' }}>
 | 
	
		
			
				|  |  |            <LoginModel
 | 
	
		
			
				|  |  | -            isRegister
 | 
	
		
			
				|  |  |              onClose={() => (state.loginStatus = false)}
 | 
	
		
			
				|  |  |              onConfirm={async (val: any) => {
 | 
	
		
			
				|  |  |                if (val.loginTag) {
 | 
	
	
		
			
				|  | @@ -693,6 +708,9 @@ export default defineComponent({
 | 
	
		
			
				|  |  |            message={state.message}
 | 
	
		
			
				|  |  |            showButton={false}
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +          !staffState.isShow && <Loading></Loading>
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |      );
 | 
	
		
			
				|  |  |    }
 |