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 { convertToHttps, validateUrl } from '~/utils/url'
|
||||||
|
|
||||||
import ImportSongsModal from './ImportSongsModal.vue'
|
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 PlaylistSelectionModal from './PlaylistSelectionModal.vue'
|
||||||
import UserSearchModal from '../Common/UserSearchModal.vue'
|
import UserSearchModal from '../Common/UserSearchModal.vue'
|
||||||
import NeteaseUploadDialog from './NeteaseUploadDialog.vue'
|
import NeteaseUploadDialog from './NeteaseUploadDialog.vue'
|
||||||
@@ -980,12 +976,10 @@ const neteaseCookie = ref('')
|
|||||||
const searchType = ref(1) // 1: 单曲, 1009: 播客/电台
|
const searchType = ref(1) // 1: 单曲, 1009: 播客/电台
|
||||||
|
|
||||||
// 播客弹窗相关
|
// 播客弹窗相关
|
||||||
const showPodcastModal = ref(false)
|
|
||||||
const selectedPodcastId = ref('')
|
const selectedPodcastId = ref('')
|
||||||
const selectedPodcastName = ref('')
|
const selectedPodcastName = ref('')
|
||||||
const podcastCookie = ref('')
|
const podcastCookie = ref('')
|
||||||
|
|
||||||
const showRecentSongsModal = ref(false)
|
|
||||||
const showPlaylistModal = ref(false)
|
const showPlaylistModal = ref(false)
|
||||||
const showUserSearchModal = ref(false)
|
const showUserSearchModal = ref(false)
|
||||||
const collaborators = ref([])
|
const collaborators = ref([])
|
||||||
@@ -1020,7 +1014,6 @@ const searchError = ref('')
|
|||||||
// 手动输入相关
|
// 手动输入相关
|
||||||
const showManualModal = ref(false)
|
const showManualModal = ref(false)
|
||||||
|
|
||||||
const showBilibiliEpisodesModal = ref(false)
|
|
||||||
const selectedBilibiliVideo = ref(null)
|
const selectedBilibiliVideo = ref(null)
|
||||||
const bilibiliEpisodes = ref([])
|
const bilibiliEpisodes = ref([])
|
||||||
const manualArtist = ref('')
|
const manualArtist = ref('')
|
||||||
@@ -1584,7 +1577,6 @@ const openSimilarEpisodesModal = (group) => {
|
|||||||
|
|
||||||
selectedBilibiliVideo.value = videoData
|
selectedBilibiliVideo.value = videoData
|
||||||
bilibiliEpisodes.value = videoData.pages
|
bilibiliEpisodes.value = videoData.pages
|
||||||
showBilibiliEpisodesModal.value = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理剧集投票
|
// 处理剧集投票
|
||||||
@@ -1684,7 +1676,6 @@ const handleLikeFromSearch = async (song, originalResult = null) => {
|
|||||||
if (originalResult && isBilibiliMultiP(originalResult)) {
|
if (originalResult && isBilibiliMultiP(originalResult)) {
|
||||||
selectedBilibiliVideo.value = originalResult
|
selectedBilibiliVideo.value = originalResult
|
||||||
bilibiliEpisodes.value = originalResult.pages
|
bilibiliEpisodes.value = originalResult.pages
|
||||||
showBilibiliEpisodesModal.value = true
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2127,7 +2118,6 @@ const submitSong = async (result, options = {}) => {
|
|||||||
selectedPodcastId.value = result.id || result.musicId
|
selectedPodcastId.value = result.id || result.musicId
|
||||||
selectedPodcastName.value = result.title || result.song || result.name
|
selectedPodcastName.value = result.title || result.song || result.name
|
||||||
podcastCookie.value = neteaseCookie.value
|
podcastCookie.value = neteaseCookie.value
|
||||||
showPodcastModal.value = true
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2141,7 +2131,6 @@ const submitSong = async (result, options = {}) => {
|
|||||||
console.log('打开 Bilibili 剧集列表:', result)
|
console.log('打开 Bilibili 剧集列表:', result)
|
||||||
selectedBilibiliVideo.value = result
|
selectedBilibiliVideo.value = result
|
||||||
bilibiliEpisodes.value = result.pages
|
bilibiliEpisodes.value = result.pages
|
||||||
showBilibiliEpisodesModal.value = true
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2381,7 +2370,6 @@ const handleBilibiliEpisodeSelect = async (episode) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
showBilibiliEpisodesModal.value = false
|
|
||||||
if (bilibiliModalRef.value && bilibiliModalRef.value.resetSubmissionState) {
|
if (bilibiliModalRef.value && bilibiliModalRef.value.resetSubmissionState) {
|
||||||
bilibiliModalRef.value.resetSubmissionState()
|
bilibiliModalRef.value.resetSubmissionState()
|
||||||
}
|
}
|
||||||
@@ -2418,7 +2406,6 @@ const playlistModalRef = ref(null)
|
|||||||
const handlePodcastSubmit = async (song) => {
|
const handlePodcastSubmit = async (song) => {
|
||||||
const success = await submitSong(song, { isPodcastEpisode: true })
|
const success = await submitSong(song, { isPodcastEpisode: true })
|
||||||
if (success) {
|
if (success) {
|
||||||
showPodcastModal.value = false
|
|
||||||
} else {
|
} else {
|
||||||
// 如果失败,重置模态框内的提交状态
|
// 如果失败,重置模态框内的提交状态
|
||||||
if (podcastModalRef.value && podcastModalRef.value.resetSubmissionState) {
|
if (podcastModalRef.value && podcastModalRef.value.resetSubmissionState) {
|
||||||
@@ -2437,7 +2424,6 @@ const handlePodcastPlay = async (song) => {
|
|||||||
const handleRecentSongSubmit = async (song) => {
|
const handleRecentSongSubmit = async (song) => {
|
||||||
const success = await submitSong(song, { isPodcastEpisode: false, isDirectSubmit: true })
|
const success = await submitSong(song, { isPodcastEpisode: false, isDirectSubmit: true })
|
||||||
if (success) {
|
if (success) {
|
||||||
showRecentSongsModal.value = false
|
|
||||||
} else {
|
} else {
|
||||||
// 如果失败,重置模态框内的提交状态
|
// 如果失败,重置模态框内的提交状态
|
||||||
if (recentSongsModalRef.value && recentSongsModalRef.value.resetSubmissionState) {
|
if (recentSongsModalRef.value && recentSongsModalRef.value.resetSubmissionState) {
|
||||||
|
|||||||
@@ -331,13 +331,6 @@
|
|||||||
<Icon name="music" :size="40" class="text-zinc-500 opacity-20" />
|
<Icon name="music" :size="40" class="text-zinc-500 opacity-20" />
|
||||||
</div>
|
</div>
|
||||||
<p class="text-zinc-400 font-medium mb-8">需要登录网易云音乐账号才能管理歌单</p>
|
<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>
|
||||||
|
|
||||||
<div v-else class="space-y-8">
|
<div v-else class="space-y-8">
|
||||||
@@ -578,15 +571,6 @@
|
|||||||
@confirm="handleConfirmAction"
|
@confirm="handleConfirmAction"
|
||||||
/>
|
/>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
|
|
||||||
<Teleport to="body">
|
|
||||||
<NeteaseLoginModal
|
|
||||||
v-if="showLoginModal"
|
|
||||||
:show="showLoginModal"
|
|
||||||
@close="showLoginModal = false"
|
|
||||||
@login-success="handleLoginSuccess"
|
|
||||||
/>
|
|
||||||
</Teleport>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -600,7 +584,6 @@ import ConfirmDialog from '~/components/UI/ConfirmDialog.vue'
|
|||||||
import CustomSelect from '~/components/UI/Common/CustomSelect.vue'
|
import CustomSelect from '~/components/UI/Common/CustomSelect.vue'
|
||||||
import { convertToHttps } from '~/utils/url'
|
import { convertToHttps } from '~/utils/url'
|
||||||
import { getMusicUrl as resolveMusicUrl } from '~/utils/musicUrl'
|
import { getMusicUrl as resolveMusicUrl } from '~/utils/musicUrl'
|
||||||
import NeteaseLoginModal from './NeteaseLoginModal.vue'
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
schedules: {
|
schedules: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@@ -646,7 +629,6 @@ const playlistActionLoading = ref(false)
|
|||||||
const selectedSongIds = ref([])
|
const selectedSongIds = ref([])
|
||||||
const newPlaylistName = ref('')
|
const newPlaylistName = ref('')
|
||||||
const newPlaylistPrivacy = ref(false)
|
const newPlaylistPrivacy = ref(false)
|
||||||
const showLoginModal = ref(false)
|
|
||||||
|
|
||||||
const confirmDialog = ref({
|
const confirmDialog = ref({
|
||||||
show: false,
|
show: false,
|
||||||
@@ -1094,10 +1076,8 @@ const handleLoginSuccess = (data) => {
|
|||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
localStorage.setItem('netease_cookie', data.cookie)
|
localStorage.setItem('netease_cookie', data.cookie)
|
||||||
localStorage.setItem('netease_user', JSON.stringify(data.user))
|
localStorage.setItem('netease_user', JSON.stringify(data.user))
|
||||||
// 更新全局网易云登录状态,通知其他组件(如AudioPlayer)
|
|
||||||
updateGlobalNeteaseStatus()
|
updateGlobalNeteaseStatus()
|
||||||
}
|
}
|
||||||
showLoginModal.value = false
|
|
||||||
if (showPlaylistModal.value) {
|
if (showPlaylistModal.value) {
|
||||||
reloadPlaylists()
|
reloadPlaylists()
|
||||||
}
|
}
|
||||||
@@ -1105,7 +1085,6 @@ const handleLoginSuccess = (data) => {
|
|||||||
|
|
||||||
const handleAddToPlaylistClick = () => {
|
const handleAddToPlaylistClick = () => {
|
||||||
if (!isNeteaseLoggedIn.value) {
|
if (!isNeteaseLoggedIn.value) {
|
||||||
showLoginModal.value = true
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!neteaseSongs.value.length) {
|
if (!neteaseSongs.value.length) {
|
||||||
@@ -1123,10 +1102,6 @@ const closePlaylistModal = () => {
|
|||||||
showPlaylistModal.value = false
|
showPlaylistModal.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const openLoginFromPlaylist = () => {
|
|
||||||
showLoginModal.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const reloadPlaylists = async () => {
|
const reloadPlaylists = async () => {
|
||||||
if (!isNeteaseLoggedIn.value || !neteaseCookie.value || !neteaseUser.value) return
|
if (!isNeteaseLoggedIn.value || !neteaseCookie.value || !neteaseUser.value) return
|
||||||
const uid = neteaseUser.value.userId || neteaseUser.value.id
|
const uid = neteaseUser.value.userId || neteaseUser.value.id
|
||||||
|
|||||||
Reference in New Issue
Block a user