From e3f783cb65741d03aefaab26f51f89ef07e03658 Mon Sep 17 00:00:00 2001 From: qier222 <68148142+qier222@users.noreply.github.com> Date: Tue, 27 Oct 2020 17:22:47 +0800 Subject: [PATCH 1/2] fix: reset document title when music stop --- src/router/index.js | 4 ---- src/store/actions.js | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 38f2fa5..6355f3e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,6 +1,5 @@ import Vue from "vue"; import VueRouter from "vue-router"; -import store from "@/store"; import NProgress from "nprogress"; import "@/assets/css/nprogress.css"; import { isLooseLoggedIn } from "@/utils/auth"; @@ -118,9 +117,6 @@ const router = new VueRouter({ router.beforeEach((to, from, next) => { // 需要登录的逻辑 if (to.meta.requireLogin) { - if (store.state.data.user.nickname === undefined) { - next({ path: "/login" }); - } if (isLooseLoggedIn()) { next(); } else { diff --git a/src/store/actions.js b/src/store/actions.js index 6a28df9..7d61fb5 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -85,6 +85,7 @@ export default { if (state.player.repeat !== "off") { nextTrack = state.player.list.find((t) => t.sort === 0); } else { + document.title = "YesPlayMusic"; return; } } From e06bb34abdd610c3697510964258640a399bf14c Mon Sep 17 00:00:00 2001 From: kunkka Date: Tue, 27 Oct 2020 23:16:07 +0800 Subject: [PATCH 2/2] build: update ignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index bf9c4ef..6a42520 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store node_modules /dist +dist_electron # local env files @@ -24,5 +25,4 @@ pnpm-debug.log* *.sw? .vercel -NeteaseCloudMusicApi-master NeteaseCloudMusicApi-master.zip