@@ -155,6 +163,15 @@ export default {
showUserProfileMenu(e) {
this.$refs.userProfileMenu.openMenu(e);
},
+ showSearchList(e) {
+ this.$refs.showSearchList.openMenu(e);
+ },
+ toCoSearch(item) {
+ this.$router.push({
+ name: 'coSearch',
+ query: { server: item, keywords: this.keywords },
+ });
+ },
logout() {
if (!confirm('确定要退出登录吗?')) return;
doLogout();
diff --git a/src/components/Player.vue b/src/components/Player.vue
index 0feb0a2..cd405f0 100644
--- a/src/components/Player.vue
+++ b/src/components/Player.vue
@@ -28,6 +28,7 @@
diff --git a/src/components/TrackList.vue b/src/components/TrackList.vue
index c9f4138..d4971e3 100644
--- a/src/components/TrackList.vue
+++ b/src/components/TrackList.vue
@@ -62,11 +62,11 @@
@@ -101,8 +101,12 @@ export default {
default: 'tracklist',
}, // tracklist | album | playlist | cloudDisk
id: {
- type: Number,
- default: 0,
+ type: String,
+ default: '0',
+ },
+ maxSize: {
+ type: String,
+ default: '20',
},
dbclickTrackFunc: {
type: String,
@@ -195,7 +199,17 @@ export default {
};
this.rightClickedTrackIndex = -1;
},
+ playThisListByTrack(track) {
+ this.showToast('正在进行其他平台播放');
+ let tracks = this.tracks.filter(_track => {
+ return _track.playable == 1;
+ });
+ this.player.replacePlaylist(tracks, track, 'artist', track);
+ },
playThisList(trackID) {
+ if (trackID.constructor === Object) this.playThisListByTrack(trackID);
+ trackID = trackID.id || trackID.songId;
+ console.log(this.dbclickTrackFunc);
if (this.dbclickTrackFunc === 'default') {
this.playThisListDefault(trackID);
} else if (this.dbclickTrackFunc === 'none') {
diff --git a/src/components/TrackListItem.vue b/src/components/TrackListItem.vue
index 6df0f89..0bc352e 100644
--- a/src/components/TrackListItem.vue
+++ b/src/components/TrackListItem.vue
@@ -4,6 +4,7 @@
:class="trackClass"
:style="trackStyle"
:title="showUnavailableSongInGreyStyle ? track.reason : ''"
+ @click="playTrack"
@mouseover="hover = true"
@mouseleave="hover = false"
>
@@ -12,7 +13,8 @@
:src="imgUrl"
loading="lazy"
:class="{ hover: focus }"
- @click="goToAlbum"
+ onerror="this.src = 'https://p2.music.126.net/UeTuwE7pvjBpypWLudqukA==/3132508627578625.jpg'; this.onerror=null;"
+ @click.stop="goToAlbum"
/>
-
+
{
+ getLyric(server) {
+ return getLyric(this.currentTrack.id, server).then(data => {
if (!data?.lrc?.lyric) {
this.lyric = [];
this.tlyric = [];
@@ -912,7 +919,6 @@ export default {
.lyrics-page.no-lyric {
.left-side {
transition: all 0.5s;
- transform: translateX(27vh);
margin-right: 0;
}
}
@@ -960,7 +966,6 @@ export default {
.slide-fade-enter,
.slide-fade-leave-to {
- transform: translateX(27vh);
opacity: 0;
}
diff --git a/src/views/playlist.vue b/src/views/playlist.vue
index 32563ff..f394dd7 100644
--- a/src/views/playlist.vue
+++ b/src/views/playlist.vue
@@ -5,8 +5,8 @@
class="playlist-info"
>
-
- {{ playlist.description }}
+
@@ -164,9 +167,10 @@
{
this.playlist = data.playlist;
this.tracks = data.playlist.tracks;
diff --git a/vue.config.js b/vue.config.js
index a2daee3..cece704 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -14,7 +14,8 @@ module.exports = {
proxy: {
'^/api': {
target:
- 'https://service-osrz4um8-1257251314.gz.apigw.tencentcs.com/release/',
+ // 'https://service-osrz4um8-1257251314.gz.apigw.tencentcs.com/release/',
+ 'http://127.0.0.1:3000/',
changeOrigin: true,
pathRewrite: {
'^/api': '/',