|
@@ -22,7 +22,7 @@ import MEmpty from '@/components/col-result'
|
|
|
import dayjs from 'dayjs'
|
|
|
import { nextTick } from 'process'
|
|
|
import ShareModel from './share-model'
|
|
|
-import { usePageVisibility, useEventListener } from '@vant/use'
|
|
|
+import { usePageVisibility } from '@vant/use'
|
|
|
import "plyr/dist/plyr.css";
|
|
|
import Plyr from "plyr";
|
|
|
import { generateMixedData } from "./audioVisualDraw"
|
|
@@ -147,7 +147,8 @@ export default defineComponent({
|
|
|
});
|
|
|
};
|
|
|
// 滚动事件
|
|
|
- const cleanScrollEvent: any = useEventListener('scroll', () => {
|
|
|
+ const handleScroll = () => {
|
|
|
+ console.log('滚动',123)
|
|
|
const height =
|
|
|
window.scrollY ||
|
|
|
document.documentElement.scrollTop
|
|
@@ -160,7 +161,7 @@ export default defineComponent({
|
|
|
isScreenScroll.value = false
|
|
|
setStatusBarTextColor(true)
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
// 设置导航栏颜色
|
|
|
function setStatusBarTextColor(isWhite:boolean){
|
|
|
postMessage({
|
|
@@ -493,6 +494,7 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
onMounted(async () => {
|
|
|
+ document.addEventListener("scroll", handleScroll)
|
|
|
setStatusBarTextColor(true)
|
|
|
try {
|
|
|
const res = await api_userMusicDetail(state.id)
|
|
@@ -540,7 +542,7 @@ export default defineComponent({
|
|
|
})
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
- cleanScrollEvent()
|
|
|
+ document.removeEventListener("scroll", handleScroll)
|
|
|
state._plrl?.destroy()
|
|
|
})
|
|
|
return () => (
|