mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 05:38:04 +00:00
feat: using vuex to make login status reactively (#51)
This commit is contained in:
parent
5ce9c3689a
commit
780b429fa9
13 changed files with 110 additions and 71 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { isLoggedIn } from "./auth";
|
||||
import { isAccountLoggedIn } from "./auth";
|
||||
import store from "@/store";
|
||||
|
||||
export function isTrackPlayable(track) {
|
||||
|
|
@ -7,7 +7,7 @@ export function isTrackPlayable(track) {
|
|||
reason: "",
|
||||
};
|
||||
if (track.fee === 1 || track.privilege?.fee === 1) {
|
||||
if (isLoggedIn && store.state.settings.user.vipType === 11) {
|
||||
if (isAccountLoggedIn() && store.state.settings.user.vipType === 11) {
|
||||
result.playable = true;
|
||||
} else {
|
||||
result.playable = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue