fix: 删除 4 个已清理 Modal 的残留 import/ref/template(ScheduleList + RequestForm)
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user