192 lines
7.1 KiB
Diff
192 lines
7.1 KiB
Diff
From f4aa9884e288969a7f92284714b83a3e805684db Mon Sep 17 00:00:00 2001
|
||
From: HenryDu8133 <813367384@qq.com>
|
||
Date: Sun, 6 Sep 2026 11:14:30 +0800
|
||
Subject: [PATCH 15/58] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=204=20=E4=B8=AA?=
|
||
=?UTF-8?q?=E5=B7=B2=E6=B8=85=E7=90=86=20Modal=20=E7=9A=84=E6=AE=8B?=
|
||
=?UTF-8?q?=E7=95=99=20import/ref/template=EF=BC=88ScheduleList=20+=20Requ?=
|
||
=?UTF-8?q?estForm=EF=BC=89?=
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
---
|
||
app/components/Songs/RequestForm.vue | 14 --------------
|
||
app/components/Songs/ScheduleList.vue | 25 -------------------------
|
||
2 files changed, 39 deletions(-)
|
||
|
||
diff --git a/app/components/Songs/RequestForm.vue b/app/components/Songs/RequestForm.vue
|
||
index 12909ef..cadb028 100644
|
||
--- a/app/components/Songs/RequestForm.vue
|
||
+++ b/app/components/Songs/RequestForm.vue
|
||
@@ -849,10 +849,6 @@ import Icon from '../UI/Icon.vue'
|
||
import { convertToHttps, validateUrl } from '~/utils/url'
|
||
|
||
import ImportSongsModal from './ImportSongsModal.vue'
|
||
-import NeteaseLoginModal from './NeteaseLoginModal.vue'
|
||
-import PodcastEpisodesModal from './PodcastEpisodesModal.vue'
|
||
-import BilibiliEpisodesModal from './BilibiliEpisodesModal.vue'
|
||
-import RecentSongsModal from './RecentSongsModal.vue'
|
||
import PlaylistSelectionModal from './PlaylistSelectionModal.vue'
|
||
import UserSearchModal from '../Common/UserSearchModal.vue'
|
||
import NeteaseUploadDialog from './NeteaseUploadDialog.vue'
|
||
@@ -980,12 +976,10 @@ const neteaseCookie = ref('')
|
||
const searchType = ref(1) // 1: 单曲, 1009: 播客/电台
|
||
|
||
// 播客弹窗相关
|
||
-const showPodcastModal = ref(false)
|
||
const selectedPodcastId = ref('')
|
||
const selectedPodcastName = ref('')
|
||
const podcastCookie = ref('')
|
||
|
||
-const showRecentSongsModal = ref(false)
|
||
const showPlaylistModal = ref(false)
|
||
const showUserSearchModal = ref(false)
|
||
const collaborators = ref([])
|
||
@@ -1020,7 +1014,6 @@ const searchError = ref('')
|
||
// 手动输入相关
|
||
const showManualModal = ref(false)
|
||
|
||
-const showBilibiliEpisodesModal = ref(false)
|
||
const selectedBilibiliVideo = ref(null)
|
||
const bilibiliEpisodes = ref([])
|
||
const manualArtist = ref('')
|
||
@@ -1584,7 +1577,6 @@ const openSimilarEpisodesModal = (group) => {
|
||
|
||
selectedBilibiliVideo.value = videoData
|
||
bilibiliEpisodes.value = videoData.pages
|
||
- showBilibiliEpisodesModal.value = true
|
||
}
|
||
|
||
// 处理剧集投票
|
||
@@ -1684,7 +1676,6 @@ const handleLikeFromSearch = async (song, originalResult = null) => {
|
||
if (originalResult && isBilibiliMultiP(originalResult)) {
|
||
selectedBilibiliVideo.value = originalResult
|
||
bilibiliEpisodes.value = originalResult.pages
|
||
- showBilibiliEpisodesModal.value = true
|
||
return
|
||
}
|
||
|
||
@@ -2127,7 +2118,6 @@ const submitSong = async (result, options = {}) => {
|
||
selectedPodcastId.value = result.id || result.musicId
|
||
selectedPodcastName.value = result.title || result.song || result.name
|
||
podcastCookie.value = neteaseCookie.value
|
||
- showPodcastModal.value = true
|
||
return
|
||
}
|
||
|
||
@@ -2141,7 +2131,6 @@ const submitSong = async (result, options = {}) => {
|
||
console.log('打开 Bilibili 剧集列表:', result)
|
||
selectedBilibiliVideo.value = result
|
||
bilibiliEpisodes.value = result.pages
|
||
- showBilibiliEpisodesModal.value = true
|
||
return
|
||
}
|
||
|
||
@@ -2381,7 +2370,6 @@ const handleBilibiliEpisodeSelect = async (episode) => {
|
||
})
|
||
|
||
if (success) {
|
||
- showBilibiliEpisodesModal.value = false
|
||
if (bilibiliModalRef.value && bilibiliModalRef.value.resetSubmissionState) {
|
||
bilibiliModalRef.value.resetSubmissionState()
|
||
}
|
||
@@ -2418,7 +2406,6 @@ const playlistModalRef = ref(null)
|
||
const handlePodcastSubmit = async (song) => {
|
||
const success = await submitSong(song, { isPodcastEpisode: true })
|
||
if (success) {
|
||
- showPodcastModal.value = false
|
||
} else {
|
||
// 如果失败,重置模态框内的提交状态
|
||
if (podcastModalRef.value && podcastModalRef.value.resetSubmissionState) {
|
||
@@ -2437,7 +2424,6 @@ const handlePodcastPlay = async (song) => {
|
||
const handleRecentSongSubmit = async (song) => {
|
||
const success = await submitSong(song, { isPodcastEpisode: false, isDirectSubmit: true })
|
||
if (success) {
|
||
- showRecentSongsModal.value = false
|
||
} else {
|
||
// 如果失败,重置模态框内的提交状态
|
||
if (recentSongsModalRef.value && recentSongsModalRef.value.resetSubmissionState) {
|
||
diff --git a/app/components/Songs/ScheduleList.vue b/app/components/Songs/ScheduleList.vue
|
||
index 0a5b247..ffb3b5e 100644
|
||
--- a/app/components/Songs/ScheduleList.vue
|
||
+++ b/app/components/Songs/ScheduleList.vue
|
||
@@ -331,13 +331,6 @@
|
||
<Icon name="music" :size="40" class="text-zinc-500 opacity-20" />
|
||
</div>
|
||
<p class="text-zinc-400 font-medium mb-8">需要登录网易云音乐账号才能管理歌单</p>
|
||
- <button
|
||
- class="px-10 py-4 rounded-2xl bg-blue-600 hover:bg-blue-500 text-white font-black transition-all active:scale-95 shadow-xl shadow-blue-900/20"
|
||
- type="button"
|
||
- @click="openLoginFromPlaylist"
|
||
- >
|
||
- 立即登录
|
||
- </button>
|
||
</div>
|
||
|
||
<div v-else class="space-y-8">
|
||
@@ -578,15 +571,6 @@
|
||
@confirm="handleConfirmAction"
|
||
/>
|
||
</Teleport>
|
||
-
|
||
- <Teleport to="body">
|
||
- <NeteaseLoginModal
|
||
- v-if="showLoginModal"
|
||
- :show="showLoginModal"
|
||
- @close="showLoginModal = false"
|
||
- @login-success="handleLoginSuccess"
|
||
- />
|
||
- </Teleport>
|
||
</template>
|
||
|
||
<script setup>
|
||
@@ -600,7 +584,6 @@ import ConfirmDialog from '~/components/UI/ConfirmDialog.vue'
|
||
import CustomSelect from '~/components/UI/Common/CustomSelect.vue'
|
||
import { convertToHttps } from '~/utils/url'
|
||
import { getMusicUrl as resolveMusicUrl } from '~/utils/musicUrl'
|
||
-import NeteaseLoginModal from './NeteaseLoginModal.vue'
|
||
const props = defineProps({
|
||
schedules: {
|
||
type: Array,
|
||
@@ -646,7 +629,6 @@ const playlistActionLoading = ref(false)
|
||
const selectedSongIds = ref([])
|
||
const newPlaylistName = ref('')
|
||
const newPlaylistPrivacy = ref(false)
|
||
-const showLoginModal = ref(false)
|
||
|
||
const confirmDialog = ref({
|
||
show: false,
|
||
@@ -1094,10 +1076,8 @@ const handleLoginSuccess = (data) => {
|
||
if (typeof window !== 'undefined') {
|
||
localStorage.setItem('netease_cookie', data.cookie)
|
||
localStorage.setItem('netease_user', JSON.stringify(data.user))
|
||
- // 更新全局网易云登录状态,通知其他组件(如AudioPlayer)
|
||
updateGlobalNeteaseStatus()
|
||
}
|
||
- showLoginModal.value = false
|
||
if (showPlaylistModal.value) {
|
||
reloadPlaylists()
|
||
}
|
||
@@ -1105,7 +1085,6 @@ const handleLoginSuccess = (data) => {
|
||
|
||
const handleAddToPlaylistClick = () => {
|
||
if (!isNeteaseLoggedIn.value) {
|
||
- showLoginModal.value = true
|
||
return
|
||
}
|
||
if (!neteaseSongs.value.length) {
|
||
@@ -1123,10 +1102,6 @@ const closePlaylistModal = () => {
|
||
showPlaylistModal.value = false
|
||
}
|
||
|
||
-const openLoginFromPlaylist = () => {
|
||
- showLoginModal.value = true
|
||
-}
|
||
-
|
||
const reloadPlaylists = async () => {
|
||
if (!isNeteaseLoggedIn.value || !neteaseCookie.value || !neteaseUser.value) return
|
||
const uid = neteaseUser.value.userId || neteaseUser.value.id
|
||
--
|
||
2.45.1.windows.1
|
||
|