From f9cc6c73eb6533f691b6b775230440f9c5bc8641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=95=E5=B1=82=E7=94=A8=E6=88=B7?= Date: Sat, 22 Jan 2022 10:56:58 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=BA=95=E6=A0=8F=E6=AD=8C=E8=AF=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=20&=20=E5=8E=BB=E9=99=A4=E7=99=BE=E5=BA=A6?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/style.css | 8 +++++--- index.html | 14 +++----------- js/music.js | 16 +++++++++++----- vercel.json | 18 +++++++++++------- 4 files changed, 30 insertions(+), 26 deletions(-) diff --git a/css/style.css b/css/style.css index 0236ca0..0d3ef6a 100644 --- a/css/style.css +++ b/css/style.css @@ -627,9 +627,11 @@ footer { opacity: 0.8; } -.lrc-show { - /*播放音乐时底栏歌词*/ - font-size: 1.10rem; +/*播放音乐时底栏歌词*/ +#lrc { + display: none; + line-height: 46px; + opacity: 0.8; } /*弹窗样式*/ diff --git a/index.html b/index.html index 23f9f8d..4006ce0 100644 --- a/index.html +++ b/index.html @@ -36,16 +36,6 @@ crossorigin="anonymous" referrerpolicy="no-referrer" /> - -  無名 &  Made by imsyy + +
diff --git a/js/music.js b/js/music.js index d7edff2..aa82362 100644 --- a/js/music.js +++ b/js/music.js @@ -410,6 +410,11 @@ const ap = new APlayer({ ] }); +/* 底栏歌词 */ +setInterval(function () { + $("#lrc").html(" " + $(".aplayer-lrc-current").text() + " "); +}, 500); + /* 音乐通知及控制 */ ap.on('play', function () { music = $(".aplayer-title").text() + $(".aplayer-author").text(); @@ -422,16 +427,17 @@ ap.on('play', function () { $("#play").html(""); $("#music-name").html($(".aplayer-title").text() + $(".aplayer-author").text()); if ($(document).width() >= 990) { - window.lrc = setInterval(function () { - $("#lrc").html(" " + $(".aplayer-lrc-current").text() + " "); - }, 500); + $('.power').css("cssText", "display:none"); + $('#lrc').css("cssText", "display:block !important"); } }); ap.on('pause', function () { $("#play").html(""); - clearInterval(window.lrc); - $("#lrc").html("Copyright © 2020-2022 無名 & Made by imsyy"); + if ($(document).width() >= 990) { + $('#lrc').css("cssText", "display:none !important"); + $('.power').css("cssText", "display:block"); + } }); /* 一言与音乐切换 */ diff --git a/vercel.json b/vercel.json index d626d20..a049acb 100644 --- a/vercel.json +++ b/vercel.json @@ -1,8 +1,12 @@ { - "version": 2, - "routes": [ - { "handle": "filesystem" }, - { "src": "/(.*)", "status": 404, "dest": "/" } - ] - } - \ No newline at end of file + "version": 2, + "routes": [{ + "handle": "filesystem" + }, + { + "src": "/(.*)", + "status": 404, + "dest": "/" + } + ] +} \ No newline at end of file