|
@@ -4,7 +4,8 @@ import {
|
|
|
onUnmounted,
|
|
|
reactive,
|
|
|
ref,
|
|
|
- watch
|
|
|
+ watch,
|
|
|
+ nextTick
|
|
|
} from 'vue';
|
|
|
// import WaveSurfer from 'wavesurfer.js';
|
|
|
// import Regions from 'wavesurfer.js/dist/plugins/regions.js';
|
|
@@ -24,7 +25,7 @@ import videoLabel from './share-model/images/videoLabel.png';
|
|
|
import musicBg from './share-model/images/music-bg.png';
|
|
|
import playImg from './images/play.png';
|
|
|
import { browser, getGradeCh, getSecondRPM, vaildMusicScoreUrl } from '@/helpers/utils';
|
|
|
-import { onBeforeRouteUpdate, useRoute, useRouter } from 'vue-router';
|
|
|
+import { onBeforeRouteUpdate, useRoute, useRouter, onBeforeRouteLeave } from 'vue-router';
|
|
|
import {
|
|
|
api_openUserMusicDetail,
|
|
|
api_openUserMusicPage,
|
|
@@ -32,7 +33,6 @@ import {
|
|
|
api_verification
|
|
|
} from './api';
|
|
|
import MEmpty from '@/components/m-empty';
|
|
|
-import { nextTick } from 'process';
|
|
|
import MVideo from '@/components/m-video';
|
|
|
import LoginModel from './login-model';
|
|
|
import { removeAuth } from '../student-register/layout/utils';
|
|
@@ -40,15 +40,20 @@ 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";
|
|
|
import Plyr from "plyr";
|
|
|
import { Vue3Lottie } from "vue3-lottie";
|
|
|
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',
|
|
@@ -56,7 +61,10 @@ export default defineComponent({
|
|
|
const route = useRoute();
|
|
|
const router = useRouter();
|
|
|
const isScreenScroll = ref(false)
|
|
|
+ const creationHeight = ref(0)
|
|
|
const lottieDom = ref()
|
|
|
+ const lottieDom1 = ref()
|
|
|
+ const lottieDom2 = ref()
|
|
|
const state = reactive({
|
|
|
id: route.query.id,
|
|
|
isEmpty:false,
|
|
@@ -75,7 +83,7 @@ export default defineComponent({
|
|
|
},
|
|
|
params: {
|
|
|
page: 1,
|
|
|
- rows: 20
|
|
|
+ rows: 4
|
|
|
},
|
|
|
messageStatus: false,
|
|
|
message: '',
|
|
@@ -94,10 +102,14 @@ export default defineComponent({
|
|
|
const staffState = reactive({
|
|
|
staffSrc: "",
|
|
|
isShow: false,
|
|
|
- height:"initial"
|
|
|
+ height:"initial",
|
|
|
+ speedRate:1,
|
|
|
+ musicRenderType:"staff",
|
|
|
+ partIndex:0
|
|
|
})
|
|
|
const staffDom= ref<HTMLIFrameElement>()
|
|
|
const {playStaff, pauseStaff, updateProgressStaff} = staffMoveInstance()
|
|
|
+ let isInitAudioVisualDraw =false
|
|
|
// 点赞
|
|
|
const onStarChange = async () => {
|
|
|
await checkLogin();
|
|
@@ -140,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;
|
|
@@ -153,6 +165,8 @@ export default defineComponent({
|
|
|
};
|
|
|
|
|
|
const onDetail = (item: any) => {
|
|
|
+ playProgressData.playProgress = 0
|
|
|
+ playProgressData.playState = false
|
|
|
router.push({
|
|
|
path: '/shareCreation',
|
|
|
query: {
|
|
@@ -168,23 +182,10 @@ export default defineComponent({
|
|
|
fullscreen: { enabled: false },
|
|
|
});
|
|
|
const player = state._plrl
|
|
|
- // 创建音波数据
|
|
|
- if(state.playType === "Audio"){
|
|
|
- const audioDom = document.querySelector("#audioMediaSrc") as HTMLAudioElement
|
|
|
- const canvasDom = document.querySelector("#audioVisualizer") as HTMLCanvasElement
|
|
|
- const { pauseVisualDraw, playVisualDraw } = audioVisualDraw(audioDom, canvasDom)
|
|
|
- player.on('play', () => {
|
|
|
- lottieDom.value.play()
|
|
|
- playVisualDraw()
|
|
|
- });
|
|
|
- player.on('pause', () => {
|
|
|
- lottieDom.value.pause()
|
|
|
- pauseVisualDraw()
|
|
|
- });
|
|
|
- }
|
|
|
// 在微信中运行的时候,微信没有开放自动加载资源的权限,所以要等播放之后才显示播放控制器
|
|
|
player.on('loadedmetadata', () => {
|
|
|
plyrState.loaded = true
|
|
|
+ player.currentTime = playProgressData.playProgress
|
|
|
});
|
|
|
player.on("timeupdate", ()=>{
|
|
|
plyrState.currentTime = player.currentTime
|
|
@@ -218,123 +219,48 @@ export default defineComponent({
|
|
|
}
|
|
|
//点击改变播放状态
|
|
|
function handlerClickPlay(){
|
|
|
- if (state._plrl.playing) {
|
|
|
- state._plrl.pause();
|
|
|
- } else {
|
|
|
- state._plrl.play();
|
|
|
- }
|
|
|
- }
|
|
|
- /**
|
|
|
- * 音频可视化
|
|
|
- * @param audioDom
|
|
|
- * @param canvasDom
|
|
|
- * @param fftSize 2的幂数,最小为32
|
|
|
- */
|
|
|
- function audioVisualDraw(audioDom: HTMLAudioElement, canvasDom: HTMLCanvasElement, fftSize = 128) {
|
|
|
- type propsType = { canvWidth: number; canvHeight: number; canvFillColor: string; lineColor: string; lineGap: number }
|
|
|
- // canvas
|
|
|
- const canvasCtx = canvasDom.getContext("2d")!
|
|
|
- const { width, height } = canvasDom.getBoundingClientRect()
|
|
|
- canvasDom.width = width
|
|
|
- canvasDom.height = height
|
|
|
- // audio
|
|
|
- let audioCtx : AudioContext | null = null
|
|
|
- let analyser : AnalyserNode | null = null
|
|
|
- let source : MediaElementAudioSourceNode | null = null
|
|
|
- const dataArray = new Uint8Array(fftSize / 2)
|
|
|
- const draw = (data: Uint8Array, ctx: CanvasRenderingContext2D, { lineGap, canvWidth, canvHeight, canvFillColor, lineColor }: propsType) => {
|
|
|
- if (!ctx) return
|
|
|
- const w = canvWidth
|
|
|
- const h = canvHeight
|
|
|
- fillCanvasBackground(ctx, w, h, canvFillColor)
|
|
|
- // 可视化
|
|
|
- const dataLen = data.length
|
|
|
- let step = (w / 2 - lineGap * dataLen) / dataLen
|
|
|
- step < 1 && (step = 1)
|
|
|
- const midX = w / 2
|
|
|
- const midY = h / 2
|
|
|
- let xLeft = midX
|
|
|
- for (let i = 0; i < dataLen; i++) {
|
|
|
- const value = data[i]
|
|
|
- const percent = value / 255 // 最大值为255
|
|
|
- const barHeight = percent * midY
|
|
|
- canvasCtx.fillStyle = lineColor
|
|
|
- // 中间加间隙
|
|
|
- if (i === 0) {
|
|
|
- xLeft -= lineGap / 2
|
|
|
- }
|
|
|
- canvasCtx.fillRect(xLeft - step, midY - barHeight, step, barHeight)
|
|
|
- canvasCtx.fillRect(xLeft - step, midY, step, barHeight)
|
|
|
- xLeft -= step + lineGap
|
|
|
- }
|
|
|
- let xRight = midX
|
|
|
- for (let i = 0; i < dataLen; i++) {
|
|
|
- const value = data[i]
|
|
|
- const percent = value / 255 // 最大值为255
|
|
|
- const barHeight = percent * midY
|
|
|
- canvasCtx.fillStyle = lineColor
|
|
|
- if (i === 0) {
|
|
|
- xRight += lineGap / 2
|
|
|
- }
|
|
|
- canvasCtx.fillRect(xRight, midY - barHeight, step, barHeight)
|
|
|
- canvasCtx.fillRect(xRight, midY, step, barHeight)
|
|
|
- xRight += step + lineGap
|
|
|
- }
|
|
|
- }
|
|
|
- const fillCanvasBackground = (ctx: CanvasRenderingContext2D, w: number, h: number, colors: string) => {
|
|
|
- ctx.clearRect(0, 0, w, h)
|
|
|
- ctx.fillStyle = colors
|
|
|
- ctx.fillRect(0, 0, w, h)
|
|
|
- }
|
|
|
- const requestAnimationFrameFun = () => {
|
|
|
- requestAnimationFrame(() => {
|
|
|
- analyser?.getByteFrequencyData(dataArray)
|
|
|
- draw(dataArray, canvasCtx, {
|
|
|
- lineGap: 2,
|
|
|
- canvWidth: width,
|
|
|
- canvHeight: height,
|
|
|
- canvFillColor: "transparent",
|
|
|
- lineColor: "rgba(255, 255, 255, 0.7)"
|
|
|
- })
|
|
|
- if (!isPause) {
|
|
|
- requestAnimationFrameFun()
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- let isPause = true
|
|
|
- const playVisualDraw = () => {
|
|
|
- if (!audioCtx) {
|
|
|
- audioCtx = new AudioContext()
|
|
|
- source = audioCtx.createMediaElementSource(audioDom)
|
|
|
- analyser = audioCtx.createAnalyser()
|
|
|
- analyser.fftSize = fftSize
|
|
|
- source?.connect(analyser)
|
|
|
- analyser.connect(audioCtx.destination)
|
|
|
- }
|
|
|
- //audioCtx.resume() // 重新更新状态 加了暂停和恢复音频音质发生了变化 所以这里取消了
|
|
|
- isPause = false
|
|
|
- requestAnimationFrameFun()
|
|
|
- }
|
|
|
- const pauseVisualDraw = () => {
|
|
|
- isPause = true
|
|
|
- //audioCtx?.suspend() // 暂停 加了暂停和恢复音频音质发生了变化 所以这里取消了
|
|
|
- // source?.disconnect()
|
|
|
- // analyser?.disconnect()
|
|
|
+ const player = state._plrl;
|
|
|
+ // 由于ios低版本必须在用户操作之后才能初始化 createMediaElementSource 所以必须在用户操作之后初始化
|
|
|
+ if(!isInitAudioVisualDraw && state.playType === "Audio"){
|
|
|
+ isInitAudioVisualDraw = true
|
|
|
+ // 创建音波数据
|
|
|
+ const audioDom = document.querySelector("#audioMediaSrc") as HTMLAudioElement
|
|
|
+ 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()
|
|
|
+ playVisualDraw()
|
|
|
+ });
|
|
|
+ player.on('pause', () => {
|
|
|
+ lottieDom.value?.pause()
|
|
|
+ lottieDom1.value?.pause()
|
|
|
+ lottieDom2.value?.pause()
|
|
|
+ pauseVisualDraw()
|
|
|
+ });
|
|
|
}
|
|
|
- return {
|
|
|
- playVisualDraw,
|
|
|
- pauseVisualDraw
|
|
|
+ if (player.playing) {
|
|
|
+ player.pause();
|
|
|
+ } else {
|
|
|
+ player.play();
|
|
|
}
|
|
|
}
|
|
|
function handlerLandscapeScreen(event:any){
|
|
|
event.stopPropagation()
|
|
|
+ playProgressData.playState = !!state._plrl?.playing
|
|
|
+ playProgressData.playProgress = state._plrl?.currentTime || 0
|
|
|
router.push({
|
|
|
path:"/playCreation",
|
|
|
query:{
|
|
|
resourceUrl:encodeURIComponent(state.musicDetail?.videoUrl),
|
|
|
+ videoBgUrl:encodeURIComponent(state.musicDetail?.videoImg || ""),
|
|
|
musicSheetName:encodeURIComponent(state.musicDetail?.musicSheetName),
|
|
|
username:encodeURIComponent(state.musicDetail?.username),
|
|
|
- musicSheetId:encodeURIComponent(state.musicDetail?.musicSheetId)
|
|
|
+ musicSheetId:encodeURIComponent(state.musicDetail?.musicSheetId),
|
|
|
+ speedRate:encodeURIComponent(staffState.speedRate),
|
|
|
+ musicRenderType:encodeURIComponent(staffState.musicRenderType),
|
|
|
+ partIndex:encodeURIComponent(staffState.partIndex),
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -371,6 +297,13 @@ export default defineComponent({
|
|
|
return;
|
|
|
} else {
|
|
|
state.musicDetail = res.data;
|
|
|
+ try{
|
|
|
+ const jsonConfig = JSON.parse(res.data.jsonConfig)
|
|
|
+ jsonConfig.speedRate && (staffState.speedRate = jsonConfig.speedRate)
|
|
|
+ jsonConfig.musicRenderType && (staffState.musicRenderType = jsonConfig.musicRenderType)
|
|
|
+ jsonConfig.partIndex && (staffState.partIndex = jsonConfig.partIndex)
|
|
|
+ }catch{
|
|
|
+ }
|
|
|
// 五线谱
|
|
|
initStaff()
|
|
|
getList();
|
|
@@ -384,7 +317,7 @@ export default defineComponent({
|
|
|
nextTick(() => {
|
|
|
initMediaPlay();
|
|
|
});
|
|
|
-}
|
|
|
+ }
|
|
|
} catch (err:any) {
|
|
|
// 没有的时候显示缺省页
|
|
|
state.message = err;
|
|
@@ -417,17 +350,19 @@ export default defineComponent({
|
|
|
});
|
|
|
// 初始化五线谱
|
|
|
function initStaff(){
|
|
|
- const src = `${vaildMusicScoreUrl()}/instrument/#/simple-detail?id=${state.musicDetail.musicSheetId}&musicRenderType=staff`;
|
|
|
- //const src = `http://192.168.3.68:3000/instrument.html#/simple-detail?id=${state.musicDetail.musicSheetId}&musicRenderType=staff`;
|
|
|
+ const src = `${vaildMusicScoreUrl()}/instrument/#/simple-detail?id=${state.musicDetail.musicSheetId}&musicRenderType=${staffState.musicRenderType}&part-index=${staffState.partIndex}`;
|
|
|
+ //const src = `http://192.168.3.122:3000/instrument.html#/simple-detail?id=${state.musicDetail.musicSheetId}&musicRenderType=${staffState.musicRenderType}&part-index=${staffState.partIndex}`;
|
|
|
staffState.staffSrc = src
|
|
|
window.addEventListener('message', (event) => {
|
|
|
const { api, height } = event.data;
|
|
|
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)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -440,7 +375,7 @@ export default defineComponent({
|
|
|
{
|
|
|
api: 'api_playProgress',
|
|
|
content: {
|
|
|
- currentTime: state._plrl.currentTime
|
|
|
+ currentTime: state._plrl.currentTime * staffState.speedRate
|
|
|
}
|
|
|
},
|
|
|
"*"
|
|
@@ -473,14 +408,14 @@ export default defineComponent({
|
|
|
"*"
|
|
|
)
|
|
|
}
|
|
|
- const updateProgressStaff = (currentTime: string) => {
|
|
|
+ const updateProgressStaff = (currentTime: number) => {
|
|
|
// 没渲染不执行
|
|
|
if(!staffState.isShow) return
|
|
|
staffDom.value?.contentWindow?.postMessage(
|
|
|
{
|
|
|
api: 'api_updateProgress',
|
|
|
content: {
|
|
|
- currentTime: state._plrl.currentTime
|
|
|
+ currentTime: currentTime * staffState.speedRate
|
|
|
}
|
|
|
},
|
|
|
"*"
|
|
@@ -492,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) => {
|
|
@@ -505,19 +445,29 @@ export default defineComponent({
|
|
|
state.playType = '';
|
|
|
state.params.page = 1;
|
|
|
state.list = [];
|
|
|
+ isInitAudioVisualDraw = false
|
|
|
if(state._plrl){
|
|
|
state._plrl.destroy()
|
|
|
}
|
|
|
+ plyrState.playIngShow = true
|
|
|
staffState.staffSrc = ""
|
|
|
staffState.isShow = false
|
|
|
staffState.height = "initial"
|
|
|
__init();
|
|
|
});
|
|
|
+ onBeforeRouteLeave((to, from, next)=>{
|
|
|
+ if(to.path !== "/playCreation"){
|
|
|
+ playProgressData.playProgress = 0
|
|
|
+ playProgressData.playState = false
|
|
|
+ }
|
|
|
+ next()
|
|
|
+ })
|
|
|
return () => (
|
|
|
<div
|
|
|
style={
|
|
|
{
|
|
|
- '--barheight':state.heightV + "px"
|
|
|
+ '--barheight':state.heightV + "px",
|
|
|
+ "--creationHeight":creationHeight.value ? creationHeight.value+"px" : "100vh"
|
|
|
}
|
|
|
}
|
|
|
class={[
|
|
@@ -540,7 +490,7 @@ export default defineComponent({
|
|
|
{
|
|
|
state.isEmpty ?
|
|
|
<div class={styles.isEmpty}>
|
|
|
- <MEmpty description="作品已删除~" />
|
|
|
+ <MEmpty image={"empty2"} description="作品已删除~" />
|
|
|
</div> :
|
|
|
<>
|
|
|
<div class={styles.singerBox}>
|
|
@@ -561,6 +511,8 @@ export default defineComponent({
|
|
|
<div class={styles.audioBox}>
|
|
|
<canvas class={styles.audioVisualizer} id="audioVisualizer"></canvas>
|
|
|
<Vue3Lottie ref={lottieDom} class={styles.audioBga} animationData={audioBga} autoPlay={false} loop={true}></Vue3Lottie>
|
|
|
+ <Vue3Lottie ref={lottieDom1} class={styles.audioBga1} animationData={audioBga1} autoPlay={false} loop={true}></Vue3Lottie>
|
|
|
+ <Vue3Lottie ref={lottieDom2} class={styles.audioBga2} animationData={audioBga2} autoPlay={false} loop={true}></Vue3Lottie>
|
|
|
<audio
|
|
|
crossorigin="anonymous"
|
|
|
id="audioMediaSrc"
|
|
@@ -577,7 +529,7 @@ export default defineComponent({
|
|
|
id="videoMediaSrc"
|
|
|
class={styles.videoBox}
|
|
|
src={state.musicDetail?.videoUrl}
|
|
|
- data-poster={videobg}
|
|
|
+ data-poster={ state.musicDetail?.videoImg || videobg}
|
|
|
preload="metadata"
|
|
|
playsinline
|
|
|
/>
|
|
@@ -644,57 +596,65 @@ 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 description="暂无数据" />
|
|
|
+ <MEmpty image={"empty2"} description="暂无作品" />
|
|
|
)}
|
|
|
</div>
|
|
|
{
|
|
@@ -711,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) {
|
|
@@ -749,6 +708,9 @@ export default defineComponent({
|
|
|
message={state.message}
|
|
|
showButton={false}
|
|
|
/>
|
|
|
+ {
|
|
|
+ !staffState.isShow && <Loading></Loading>
|
|
|
+ }
|
|
|
</div>
|
|
|
);
|
|
|
}
|