|
|
@ -1,9 +1,12 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div v-show="show">
|
|
|
|
<div v-show="show">
|
|
|
|
<h1>
|
|
|
|
<h1>
|
|
|
|
<img class="head" :src="data.user.avatarUrl | resizeImage" />{{
|
|
|
|
<img class="avatar" :src="data.user.avatarUrl | resizeImage" />{{
|
|
|
|
data.user.nickname
|
|
|
|
data.user.nickname
|
|
|
|
}}{{ $t("library.sLibrary") }}
|
|
|
|
}}{{ $t("library.sLibrary") }}
|
|
|
|
|
|
|
|
<button-icon @click.native="showUserProfileMenu"
|
|
|
|
|
|
|
|
><svg-icon icon-class="arrow-right"
|
|
|
|
|
|
|
|
/></button-icon>
|
|
|
|
</h1>
|
|
|
|
</h1>
|
|
|
|
<div class="section-one">
|
|
|
|
<div class="section-one">
|
|
|
|
<div class="liked-songs" @click="goToLikedSongsList">
|
|
|
|
<div class="liked-songs" @click="goToLikedSongsList">
|
|
|
@ -109,6 +112,15 @@
|
|
|
|
<MvRow :mvs="mvs" />
|
|
|
|
<MvRow :mvs="mvs" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ContextMenu ref="userProfileMenu">
|
|
|
|
|
|
|
|
<div class="item" @click="settings"
|
|
|
|
|
|
|
|
><svg-icon icon-class="settings" />设置</div
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<div class="item" @click="logout"
|
|
|
|
|
|
|
|
><svg-icon icon-class="logout" />退出登录</div
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</ContextMenu>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -124,9 +136,11 @@ import {
|
|
|
|
} from "@/api/user";
|
|
|
|
} from "@/api/user";
|
|
|
|
import { randomNum, dailyTask } from "@/utils/common";
|
|
|
|
import { randomNum, dailyTask } from "@/utils/common";
|
|
|
|
import { getPlaylistDetail } from "@/api/playlist";
|
|
|
|
import { getPlaylistDetail } from "@/api/playlist";
|
|
|
|
import { isAccountLoggedIn } from "@/utils/auth";
|
|
|
|
import { isAccountLoggedIn, doLogout } from "@/utils/auth";
|
|
|
|
import NProgress from "nprogress";
|
|
|
|
import NProgress from "nprogress";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import ContextMenu from "@/components/ContextMenu.vue";
|
|
|
|
|
|
|
|
import ButtonIcon from "@/components/ButtonIcon.vue";
|
|
|
|
import TrackList from "@/components/TrackList.vue";
|
|
|
|
import TrackList from "@/components/TrackList.vue";
|
|
|
|
import CoverRow from "@/components/CoverRow.vue";
|
|
|
|
import CoverRow from "@/components/CoverRow.vue";
|
|
|
|
import SvgIcon from "@/components/SvgIcon.vue";
|
|
|
|
import SvgIcon from "@/components/SvgIcon.vue";
|
|
|
@ -134,7 +148,7 @@ import MvRow from "@/components/MvRow.vue";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Library",
|
|
|
|
name: "Library",
|
|
|
|
components: { SvgIcon, CoverRow, TrackList, MvRow },
|
|
|
|
components: { SvgIcon, CoverRow, TrackList, MvRow, ButtonIcon, ContextMenu },
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
show: false,
|
|
|
|
show: false,
|
|
|
@ -297,6 +311,17 @@ export default {
|
|
|
|
value: true,
|
|
|
|
value: true,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
showUserProfileMenu(e) {
|
|
|
|
|
|
|
|
this.$refs.userProfileMenu.openMenu(e);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
logout() {
|
|
|
|
|
|
|
|
if (!confirm("确定要退出登录吗?")) return;
|
|
|
|
|
|
|
|
doLogout();
|
|
|
|
|
|
|
|
this.$router.push({ name: "home" });
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
settings() {
|
|
|
|
|
|
|
|
this.$router.push({ name: "settings" });
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
likedSongsInState() {
|
|
|
|
likedSongsInState() {
|
|
|
@ -310,13 +335,21 @@ export default {
|
|
|
|
h1 {
|
|
|
|
h1 {
|
|
|
|
font-size: 42px;
|
|
|
|
font-size: 42px;
|
|
|
|
color: var(--color-text);
|
|
|
|
color: var(--color-text);
|
|
|
|
.head {
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
height: 44px;
|
|
|
|
height: 44px;
|
|
|
|
margin-right: 12px;
|
|
|
|
margin-right: 12px;
|
|
|
|
vertical-align: -7px;
|
|
|
|
vertical-align: -7px;
|
|
|
|
border-radius: 50%;
|
|
|
|
border-radius: 50%;
|
|
|
|
border: rgba(0, 0, 0, 0.2);
|
|
|
|
border: rgba(0, 0, 0, 0.2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.svg-icon {
|
|
|
|
|
|
|
|
width: 28px;
|
|
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
|
|
opacity: 0.18;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.section-one {
|
|
|
|
.section-one {
|
|
|
|