mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 13:17:46 +00:00
fix: hide like button after logout
This commit is contained in:
parent
51da17d1b9
commit
94e3d61dff
2 changed files with 6 additions and 1 deletions
|
|
@ -36,7 +36,8 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="like-button" v-show="isLoggedIn">
|
||||
<!-- 使用 user 的状态来判断图标是否显示 -->
|
||||
<div class="like-button" v-show="settings.user.userId">
|
||||
<button-icon
|
||||
@click.native="likeCurrentSong"
|
||||
:title="$t('player.like')"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@ import store from "@/store";
|
|||
|
||||
export function doLogout() {
|
||||
logout();
|
||||
// 移除前端本地用来认证登录的字段
|
||||
Cookies.remove("loginMode");
|
||||
// 网易云的接口会自动移除该 cookies
|
||||
// Cookies.remove("MUSIC_U");
|
||||
// 更新状态仓库中的用户信息
|
||||
store.commit("updateUser", { id: 0 });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue