mirror of
https://github.com/imsyy/SPlayer.git
synced 2025-11-25 03:14:57 +08:00
🐞 fix: 修复登录错误
This commit is contained in:
@@ -51,7 +51,6 @@ const openLoginWin = async (mainWin: BrowserWindow) => {
|
||||
if (loginTimer) clearInterval(loginTimer);
|
||||
const value = `MUSIC_U=${MUSIC_U[0].value};`;
|
||||
// 发送回主进程
|
||||
console.log("cookie:", value);
|
||||
mainWin?.webContents.send("send-cookies", value);
|
||||
loginWin.destroy();
|
||||
}
|
||||
|
||||
@@ -181,6 +181,7 @@ const menuOptions = computed<MenuOption[] | MenuGroupOption[]>(() => {
|
||||
|
||||
// 生成歌单列表
|
||||
const renderPlaylist = (playlist: CoverType[], showCover: boolean) => {
|
||||
if (!isLogin()) return [];
|
||||
return playlist.map((playlist) => ({
|
||||
key: playlist.id,
|
||||
label: () =>
|
||||
|
||||
@@ -29,6 +29,7 @@ import { radioSub } from "@/api/radio";
|
||||
*/
|
||||
export const isLogin = (): 0 | 1 | 2 => {
|
||||
const dataStore = useDataStore();
|
||||
if (!dataStore.userLoginStatus) return 0;
|
||||
if (dataStore.loginType === "uid") return 2;
|
||||
return getCookie("MUSIC_U") ? 1 : 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user