diff --git a/.env b/.env index 72a92d4b..456c9289 100644 --- a/.env +++ b/.env @@ -16,5 +16,5 @@ VITE_ICP = "豫ICP备2022018134号-1" VITE_ANN_TITLE = "" ## 公告内容 VITE_ANN_CONTENT = "" -## 公告时长(毫秒) +## 公告时长(毫秒)不可超过 999999 VITE_ANN_DURATION = 3000 diff --git a/.hintrc b/.hintrc new file mode 100644 index 00000000..c5d28ada --- /dev/null +++ b/.hintrc @@ -0,0 +1,18 @@ +{ + "extends": [ + "development" + ], + "hints": { + "detect-css-reflows/composite": "off", + "detect-css-reflows/layout": "off", + "detect-css-reflows/paint": "off", + "compat-api/css": [ + "default", + { + "ignore": [ + "backdrop-filter" + ] + } + ] + } +} \ No newline at end of file diff --git a/package.json b/package.json index e317ca5c..e2f02566 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,6 @@ { "name": "splayer", - "version": "1.1.1", - "private": true, + "version": "1.1.2", "author": "imsyy", "home": "https://imsyy.top", "github": "https://github.com/imsyy/SPlayer", diff --git a/src/api/song.js b/src/api/song.js index de6c4307..d7f88007 100644 --- a/src/api/song.js +++ b/src/api/song.js @@ -44,7 +44,9 @@ export const getMusicUrl = (id, level = "exhigh") => { */ export const getMusicNumUrl = async (id) => { const server = - process.env.NODE_ENV === "development" ? "kuwo,qq,pyncmd" : "qq,pyncmd"; + process.env.NODE_ENV === "development" + ? "kuwo,qq,pyncmd,kugou" + : "qq,pyncmd,kugou"; const url = `${import.meta.env.VITE_UNM_API}match?id=${id}&server=${server}`; const response = await fetch(url, { method: "GET", diff --git a/src/components/DataList/CoverLists.vue b/src/components/DataList/CoverLists.vue index 9a4e99cc..d3d72683 100644 --- a/src/components/DataList/CoverLists.vue +++ b/src/components/DataList/CoverLists.vue @@ -373,6 +373,7 @@ onMounted(() => { color: #fff; padding: 0.5vw; background-color: #00000010; + -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 50%; transform: scale(0.8); @@ -385,6 +386,7 @@ onMounted(() => { color: #fff; background-color: #00000030; font-size: 12px; + -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: 6px; border-top-left-radius: 8px; diff --git a/src/components/DataList/VideoLists.vue b/src/components/DataList/VideoLists.vue index a4ef9859..747b48ad 100644 --- a/src/components/DataList/VideoLists.vue +++ b/src/components/DataList/VideoLists.vue @@ -115,6 +115,7 @@ const props = defineProps({ color: #fff; padding: 0.5vw; background-color: #00000010; + -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 50%; transform: scale(0.8); @@ -126,6 +127,7 @@ const props = defineProps({ color: #fff; background-color: #00000030; font-size: 12px; + -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: 4px 8px; transition: all 0.3s; diff --git a/src/components/Personalized/PaPersonalFm.vue b/src/components/Personalized/PaPersonalFm.vue index 8f1ddff5..e8000725 100644 --- a/src/components/Personalized/PaPersonalFm.vue +++ b/src/components/Personalized/PaPersonalFm.vue @@ -127,6 +127,7 @@ onMounted(() => { width: 100%; height: 100%; background-color: #00000040; + -webkit-backdrop-filter: blur(80px); backdrop-filter: blur(80px); z-index: -1; } diff --git a/src/components/Player/BigPlayer.vue b/src/components/Player/BigPlayer.vue index d0d9a43f..6ae4a24d 100644 --- a/src/components/Player/BigPlayer.vue +++ b/src/components/Player/BigPlayer.vue @@ -12,18 +12,40 @@ " >
- - +
+ + +
+
diff --git a/src/components/Player/PlayerCover.vue b/src/components/Player/PlayerCover.vue index 08580e92..5d6262ec 100644 --- a/src/components/Player/PlayerCover.vue +++ b/src/components/Player/PlayerCover.vue @@ -149,8 +149,6 @@ const router = useRouter(); const music = musicStore(); const user = userStore(); -const canvas = ref(null); - // 歌曲进度条更新 const songTimeSliderUpdate = (val) => { if ($player && music.getPlaySongTime && music.getPlaySongTime.duration) diff --git a/src/components/Player/PlayerRecord.vue b/src/components/Player/PlayerRecord.vue index 777213ed..dd4a53d3 100644 --- a/src/components/Player/PlayerRecord.vue +++ b/src/components/Player/PlayerRecord.vue @@ -190,6 +190,7 @@ const music = musicStore(); height: 68%; border-radius: 50%; background-color: #00000050; + -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); transition: all 0.5s; .n-icon { diff --git a/src/components/Player/RollingLyrics.vue b/src/components/Player/RollingLyrics.vue index 05f774dc..a88a5155 100644 --- a/src/components/Player/RollingLyrics.vue +++ b/src/components/Player/RollingLyrics.vue @@ -214,16 +214,19 @@ const lrcTextClick = (time) => { } .placeholder { width: 100%; - height: 50%; &:nth-of-type(1) { + height: 50%; display: flex; align-items: flex-end; padding: 0 0 0.8vh 3vh; } + &:nth-last-of-type(1) { + height: 80%; + } } .lrc, .yrc { - opacity: 0.4; + opacity: 0.2; transition: all 0.3s; margin-bottom: 0.8vh; padding: 1.8vh 4vh 1.8vh 3vh; @@ -285,6 +288,7 @@ const lrcTextClick = (time) => { &:hover { @media (min-width: 768px) { background-color: #ffffff20; + opacity: 1; } } &:active { diff --git a/src/components/Player/index.vue b/src/components/Player/index.vue index 2483d121..b7f7c5b3 100644 --- a/src/components/Player/index.vue +++ b/src/components/Player/index.vue @@ -272,9 +272,15 @@ const player = ref(null); // 获取歌曲播放数据 const getPlaySongData = (data, level = setting.songLevel) => { try { - const { id, fee } = data; + const { id, fee, pc } = data; // VIP 歌曲或需要购买专辑 - if (useUnmServerHas && setting.useUnmServer && (fee === 1 || fee === 4)) { + if ( + useUnmServerHas && + setting.useUnmServer && + !pc && + (fee === 1 || fee === 4) + ) { + console.log("网易云解灰"); getMusicNumUrlData(id); } // 免费或无版权 @@ -282,7 +288,7 @@ const getPlaySongData = (data, level = setting.songLevel) => { checkMusicCanUse(id).then((res) => { if (res.success) { console.log("当前歌曲可用"); - if (fee === 1 || fee === 4) + if (!pc && (fee === 1 || fee === 4)) $message.info("当前歌曲为 VIP 专享,仅可试听"); // 获取音乐地址 getMusicUrl(id, level).then((res) => { diff --git a/src/router/routes.js b/src/router/routes.js index 57f303aa..86b4b103 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -125,7 +125,25 @@ const routes = [ meta: { title: "全局设置", }, - component: () => import("@/views/Setting/SettingView.vue"), + component: () => import("@/views/Setting/index.vue"), + redirect: "/setting/main", + children: [ + { + path: "main", + name: "setting-main", + component: () => import("@/views/Setting/main.vue"), + }, + { + path: "player", + name: "setting-player", + component: () => import("@/views/Setting/player.vue"), + }, + { + path: "other", + name: "setting-other", + component: () => import("@/views/Setting/other.vue"), + }, + ], }, // 登录页 { diff --git a/src/store/musicData.js b/src/store/musicData.js index 55446d1e..03ec6c78 100644 --- a/src/store/musicData.js +++ b/src/store/musicData.js @@ -403,7 +403,7 @@ const useMusicDataStore = defineStore("musicData", { try { if ( value.id !== - this.persistData.playlists[this.persistData.playSongIndex].id + this.persistData.playlists[this.persistData.playSongIndex]?.id ) { console.log("播放歌曲与上一次不一致"); this.playSongLink = null; diff --git a/src/style/global.scss b/src/style/global.scss index f76b7024..fe5787f7 100644 --- a/src/style/global.scss +++ b/src/style/global.scss @@ -49,14 +49,36 @@ body, .n-card-header__main { // font-weight: bold; font-size: 18px; + // position: relative; + // padding-left: 6px; + // display: flex; + // align-items: center; + // &::before { + // content: ""; + // position: absolute; + // left: -4px; + // width: 4px; + // height: 80%; + // border-radius: 4px; + // background-color: $mainColor; + // } } } + .n-card__content { + padding-right: 28px; + } .n-scrollbar { max-height: 60vh; font-size: 16px; line-height: 32px; } } +.n-modal-body-wrapper { + .n-modal-mask { + -webkit-backdrop-filter: blur(16px); + backdrop-filter: blur(16px); + } +} // Nscrollbar .n-scrollbar { diff --git a/src/views/Discover/toplists.vue b/src/views/Discover/toplists.vue index 8dff84f5..19ef3702 100644 --- a/src/views/Discover/toplists.vue +++ b/src/views/Discover/toplists.vue @@ -158,6 +158,7 @@ onMounted(() => { color: #fff; background-color: #00000030; font-size: 12px; + -webkit-backdrop-filter: blur(40px); backdrop-filter: blur(40px); padding: 4px 8px; border-radius: 8px 0 8px 0; diff --git a/src/views/Login/LoginView.vue b/src/views/Login/LoginView.vue index c7c571aa..7f566102 100644 --- a/src/views/Login/LoginView.vue +++ b/src/views/Login/LoginView.vue @@ -94,7 +94,7 @@ - - diff --git a/src/views/Setting/index.vue b/src/views/Setting/index.vue new file mode 100644 index 00000000..88f49cd4 --- /dev/null +++ b/src/views/Setting/index.vue @@ -0,0 +1,136 @@ + + + + + diff --git a/src/views/Setting/main.vue b/src/views/Setting/main.vue new file mode 100644 index 00000000..062b67e7 --- /dev/null +++ b/src/views/Setting/main.vue @@ -0,0 +1,125 @@ + + + diff --git a/src/views/Setting/other.vue b/src/views/Setting/other.vue new file mode 100644 index 00000000..2763ff83 --- /dev/null +++ b/src/views/Setting/other.vue @@ -0,0 +1,33 @@ + + + diff --git a/src/views/Setting/player.vue b/src/views/Setting/player.vue new file mode 100644 index 00000000..4b959f27 --- /dev/null +++ b/src/views/Setting/player.vue @@ -0,0 +1,206 @@ + + +