update(auth): 移除 setPlayListInfo 鉴权

feature/artists
mackt 6 months ago
parent f61dbb1062
commit 964bbb4b5f

@ -3,12 +3,7 @@ import cloneDeep from 'lodash/cloneDeep';
import { create } from 'zustand'; import { create } from 'zustand';
import { devtools, persist, createJSONStorage } from 'zustand/middleware'; import { devtools, persist, createJSONStorage } from 'zustand/middleware';
import { openLogin } from '@/components/Login/loginContext';
import { checkAuthOffline } from '@/utils/auth';
import { apiGetSongRandom } from '@/services'; import { apiGetSongRandom } from '@/services';
import { logout } from '@/utils';
interface AuioState { interface AuioState {
/** 播放状态 true: 播放 false: 暂停 */ /** 播放状态 true: 播放 false: 暂停 */
@ -239,12 +234,6 @@ const useAudioState = create<AuioState>()(
}), }),
), ),
setPlayListInfo: (list) => { setPlayListInfo: (list) => {
if (!checkAuthOffline()) {
localStorage.clear();
openLogin();
return false;
}
set( set(
produce((state) => { produce((state) => {
state.playListInfo = list; state.playListInfo = list;

Loading…
Cancel
Save