From bd24b0bb1fda690b56335e467b3b996bee4cb4d0 Mon Sep 17 00:00:00 2001 From: Janx Date: Sun, 21 May 2023 15:48:01 +0800 Subject: [PATCH] new --- src/components/MvRow.vue | 4 ++-- src/components/Navbar.vue | 2 +- src/components/TrackList.vue | 10 ++++++---- src/components/TrackListItem.vue | 3 +-- src/locale/lang/zh-CN.js | 1 - src/views/coSearch.vue | 3 +-- src/views/playlist.vue | 2 +- vue.config.js | 4 ++-- 8 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/components/MvRow.vue b/src/components/MvRow.vue index f6ee06f..6367b84 100644 --- a/src/components/MvRow.vue +++ b/src/components/MvRow.vue @@ -109,13 +109,13 @@ export default { @media (max-width: 700px) { .mv-row { - --col-num: 2; + --col-num: 3; } } @media (max-width: 550px) { .mv-row { - --col-num: 1; + --col-num: 3; } } diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index f4eafab..cb22582 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -57,7 +57,7 @@
- QQ音乐 + 其他搜索
diff --git a/src/components/TrackList.vue b/src/components/TrackList.vue index e024179..248c035 100644 --- a/src/components/TrackList.vue +++ b/src/components/TrackList.vue @@ -205,20 +205,22 @@ export default { this.rightClickedTrackIndex = -1; }, playThisListByTrack(track) { - this.showToast('正在进行其他平台播放'); + this.showToast('TrackList 正在进行其他平台播放'); 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); + if (trackID.source) { + this.playThisListByTrack(trackID); + return; + } trackID = trackID.id || trackID.songId; - console.log(this.dbclickTrackFunc); if (this.dbclickTrackFunc === 'default') { this.playThisListDefault(trackID); } else if (this.dbclickTrackFunc === 'none') { - // do nothing + // this.player.addTrackToPlayNext(trackID, true); } else if (this.dbclickTrackFunc === 'playTrackOnListByID') { this.player.playTrackOnListByID(trackID); } else if (this.dbclickTrackFunc === 'playPlaylistByID') { diff --git a/src/components/TrackListItem.vue b/src/components/TrackListItem.vue index 9dd9af8..a4dfada 100644 --- a/src/components/TrackListItem.vue +++ b/src/components/TrackListItem.vue @@ -231,8 +231,7 @@ export default { this.$router.push({ path: '/album/' + this.track.al.id }); }, playTrack() { - if (this.track.constructor === Object) - this.$parent.playThisListByTrack(this.track); + if (this.track.source) this.$parent.playThisList(this.track); else this.$parent.playThisList(this.track.id); }, likeThisSong() { diff --git a/src/locale/lang/zh-CN.js b/src/locale/lang/zh-CN.js index d2b33bd..6cf5b47 100644 --- a/src/locale/lang/zh-CN.js +++ b/src/locale/lang/zh-CN.js @@ -1,6 +1,5 @@ export default { server: { - netease: '网易云音乐', tencent: 'QQ音乐', kugou: '酷狗音乐', }, diff --git a/src/views/coSearch.vue b/src/views/coSearch.vue index 1fb10f9..1bc6300 100644 --- a/src/views/coSearch.vue +++ b/src/views/coSearch.vue @@ -102,7 +102,6 @@ export default { }, serverNameTable() { return { - netease: locale.t('server.netease'), tencent: locale.t('server.tencent'), kugou: locale.t('server.kugou'), }; @@ -119,7 +118,7 @@ export default { methods: { ...mapActions(['showToast']), playThisListByTrack(id) { - this.showToast('正在进行其他平台播放'); + this.showToast('coSearch 正在进行其他平台播放'); getPlaylistDetail(id, true, this.$route.query.server).then(data => { console.log(data); let playlist = data.playlist; diff --git a/src/views/playlist.vue b/src/views/playlist.vue index 6882a5d..8d120de 100644 --- a/src/views/playlist.vue +++ b/src/views/playlist.vue @@ -434,7 +434,7 @@ export default { ); }, playThisListByTrack(id) { - this.showToast('正在进行其他平台播放'); + this.showToast('Playlist:正在进行其他平台播放'); getPlaylistDetail(id, true, this.$route.query.server).then(data => { console.log(data); let playlist = data.playlist; diff --git a/vue.config.js b/vue.config.js index cece704..0d6fe6b 100644 --- a/vue.config.js +++ b/vue.config.js @@ -14,8 +14,8 @@ module.exports = { proxy: { '^/api': { target: - // 'https://service-osrz4um8-1257251314.gz.apigw.tencentcs.com/release/', - 'http://127.0.0.1:3000/', + 'https://service-osrz4um8-1257251314.gz.apigw.tencentcs.com/release/', + // 'http://127.0.0.1:3000/', changeOrigin: true, pathRewrite: { '^/api': '/',