fix: bugs

This commit is contained in:
qier222 2021-01-31 00:52:02 +08:00
parent 6a64e73a2c
commit d6be72f5ce
9 changed files with 27 additions and 29 deletions

View File

@ -1,12 +0,0 @@
# 尽量每个 issue 只提一个 bug 或新功能
### 提新 issue 前请确认 👉
- 没人提过这个 issue[这里看所有 issue](https://github.com/qier222/YesPlayMusic/issues)
- 项目的 Todo 里没有与你 issue 相关的内容([这里看 Todo](https://github.com/qier222/YesPlayMusic/projects/1)
### 反馈 bug 需要的信息
- 用的是网页版还是客户端
- 浏览器名称或电脑操作系统
- 控制台 Console 页面的截图(按 F12 可打开控制台)

View File

@ -50,9 +50,7 @@ export default {
},
computed: {
imageStyles() {
let styles = {
objectFit: "cover",
};
let styles = {};
if (this.fixedSize !== 0) {
styles.width = this.fixedSize + "px";
styles.height = this.fixedSize + "px";

View File

@ -101,11 +101,11 @@ export default {
img1v1ID = img1v1ID[img1v1ID.length - 1];
if (img1v1ID === "5639395138885805.jpg") {
// img1v1Url 😅😅😅
return "https://p2.music.126.net/VnZiScyynLG7atLIZ2YPkw==/18686200114669622.jpg?param=512x512";
return "https://p2.music.126.net/VnZiScyynLG7atLIZ2YPkw==/18686200114669622.jpg?param=512y512";
}
}
let img = item.img1v1Url || item.picUrl || item.coverImgUrl;
return `${img}?param=512x512`;
return `${img}?param=512y512`;
},
},
};
@ -128,6 +128,7 @@ export default {
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
word-break: break-all;
}
.info {
font-size: 12px;
@ -137,6 +138,7 @@ export default {
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
word-break: break-word;
}
}
}

View File

@ -51,7 +51,7 @@ export default {
},
getUrl(mv) {
let url = mv.imgurl16v9 ?? mv.cover ?? mv.coverUrl;
return url.replace(/^http:/, "https:") + "?param=464x260";
return url.replace(/^http:/, "https:") + "?param=464y260";
},
getID(mv) {
if (mv.id !== undefined) return mv.id;

View File

@ -11,9 +11,9 @@ export default {
},
home: {
recommendPlaylist: "推荐歌单",
recommendArtist: "推荐歌手",
recommendArtist: "推荐艺人",
newAlbum: "新专速递",
seeMore: "更多",
seeMore: "查看全部",
charts: "排行榜",
},
library: {
@ -22,7 +22,7 @@ export default {
sLikedSongs: "喜欢的音乐",
playlists: "歌单",
albums: "专辑",
artists: "歌手",
artists: "艺人",
mvs: "MV",
},
explore: {
@ -37,7 +37,7 @@ export default {
EPsSingles: "EP和单曲",
albums: "专辑",
withAlbums: "张专辑",
artist: "歌手",
artist: "艺人",
videos: "个MV",
following: "已关注",
follow: "关注",
@ -99,7 +99,7 @@ export default {
close: "关闭",
},
search: {
artist: "歌手",
artist: "艺人",
album: "专辑",
song: "歌曲",
mv: "视频",

View File

@ -157,7 +157,10 @@ export default class {
html5: true,
format: ["mp3", "flac"],
});
if (autoplay) this.play();
if (autoplay) {
this.play();
document.title = `${this._currentTrack.name} · ${this._currentTrack.ar[0].name} - YesPlayMusic`;
}
this._howler.once("end", () => {
this._nextTrackCallback();
});
@ -214,7 +217,6 @@ export default class {
let track = data.songs[0];
this._currentTrack = track;
this._updateMediaSessionMetaData(track);
document.title = `${track.name} · ${track.ar[0].name} - YesPlayMusic`;
return this._getAudioSource(track).then((source) => {
if (source) {
this._playAudioSource(source, autoplay);
@ -319,10 +321,12 @@ export default class {
pause() {
this._howler.pause();
this._playing = false;
document.title = "YesPlayMusic";
}
play() {
this._howler.play();
this._playing = true;
document.title = `${this._currentTrack.name} · ${this._currentTrack.ar[0].name} - YesPlayMusic`;
}
seek(time = null) {
if (time !== null) this._howler.seek(time);

View File

@ -103,7 +103,7 @@
</div>
<div class="similar-artists" v-if="similarArtists.length !== 0">
<div class="section-title">相似歌手</div>
<div class="section-title">相似艺人</div>
<CoverRow
type="artist"
:columnNumber="6"

View File

@ -275,6 +275,11 @@ export default {
getLikedSongs(getLyric = true) {
getPlaylistDetail(this.data.likedSongPlaylistID, true).then((data) => {
this.likedSongsPlaylist = data.playlist;
if (data.playlist.trackIds.length === 0) {
NProgress.done();
this.show = true;
return;
}
let TrackIDs = data.playlist.trackIds.slice(0, 12).map((t) => t.id);
this.likedSongIDs = TrackIDs;
getTrackDetail(this.likedSongIDs.join(",")).then((data) => {

View File

@ -160,7 +160,7 @@ export default {
.then(this.handleLoginResponse)
.catch((error) => {
this.processing = false;
alert(error);
alert(`发生错误,请检查你的账号密码是否正确\n${error}`);
});
} else {
this.processing = this.validateEmail();
@ -173,7 +173,7 @@ export default {
.then(this.handleLoginResponse)
.catch((error) => {
this.processing = false;
alert(error);
alert(`发生错误,请检查你的账号密码是否正确\n${error}`);
});
}
},
@ -188,7 +188,8 @@ export default {
this.$router.push({ path: "/library" });
} else {
this.processing = false;
alert(data.msg ?? data.message);
console.log(data.msg);
alert(data.msg ?? data.message ?? "账号或密码错误,请检查");
}
},
},