Skip to content

Commit 4bd76ce

Browse files
authored
Merge pull request #44 from imsyy/dev
fix: 修复下载歌曲异常 #43
2 parents b23c267 + ee7fe27 commit 4bd76ce

25 files changed

Lines changed: 854 additions & 339 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"qrcode.vue": "^3.3.3",
2323
"sass": "^1.56.1",
2424
"screenfull": "^6.0.2",
25+
"swiper": "^9.3.2",
2526
"throttle-debounce": "^5.0.0",
2627
"vite-plugin-html": "^3.2.0",
2728
"vue": "^3.2.45",

pnpm-lock.yaml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/DataList/CoverLists.vue

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
lazy
2323
class="coverImg"
2424
preview-disabled
25-
:src="getCoverUrl(item.cover)"
25+
:src="getCoverUrl(item.cover, 300)"
2626
fallback-src="/images/pic/default.png"
2727
>
2828
<template #placeholder>
@@ -35,7 +35,7 @@
3535
lazy
3636
class="shadow"
3737
preview-disabled
38-
:src="getCoverUrl(item.cover)"
38+
:src="getCoverUrl(item.cover, 300)"
3939
fallback-src="/images/pic/default.png"
4040
/>
4141
<n-icon class="play" size="40">
@@ -118,6 +118,7 @@ import { musicStore, userStore, settingStore } from "@/store";
118118
import { useRouter } from "vue-router";
119119
import AllArtists from "./AllArtists.vue";
120120
import PlaylistUpdate from "@/components/DataModal/PlaylistUpdate.vue";
121+
import getCoverUrl from "@/utils/getCoverUrl";
121122
122123
const { t } = useI18n();
123124
const router = useRouter();
@@ -171,16 +172,6 @@ const renderIcon = (icon) => {
171172
};
172173
};
173174
174-
// 封面图像地址
175-
const getCoverUrl = (url) => {
176-
if (!url) return "/images/pic/default.png";
177-
const imageUrl = url.replace(/^http:/, "https:");
178-
if (imageUrl.endsWith(".jpg")) {
179-
return imageUrl + "?param=300y300";
180-
}
181-
return imageUrl;
182-
};
183-
184175
// 右键菜单数据
185176
const rightMenuX = ref(0);
186177
const rightMenuY = ref(0);

src/components/DataModal/DownloadSong.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const toSongDownload = (id, br, name) => {
9696
if (res.data.url) {
9797
const type = res.data.type.toLowerCase();
9898
const songName = name ? name : t("general.name.unknownSong");
99-
fetch(res.data.url)
99+
fetch(res.data.url.replace(/^http:/, "https:"))
100100
.then((response) => response.blob())
101101
.then((blob) => {
102102
const url = window.URL.createObjectURL(blob);

src/components/Nav/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ const dropdownSelect = (key) => {
352352
setting.getSiteTheme == "light"
353353
? setting.setSiteTheme("dark")
354354
: setting.setSiteTheme("light");
355+
setting.themeAuto = false;
355356
break;
356357
// 播放历史
357358
case "history":

src/components/Personalized/PaPersonalFm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div
33
class="papersonalfm"
4-
v-if="music.getPersonalFmData.id"
4+
v-if="music.getPersonalFmData?.id"
55
:style="`background-image: url(${music.getPersonalFmData.album.picUrl.replace(
66
/^http:/,
77
'https:'

0 commit comments

Comments
 (0)