diff --git a/Plan.md b/Plan.md index 48a1ae37da31e7977b1cf7ebd7011e5f56344cd9..152f1692d5f39b66a80f0760a459f31504e0bca8 100644 --- a/Plan.md +++ b/Plan.md @@ -7,7 +7,7 @@ - [x] 复制歌词 - [x] 可以播放 - [x] 可以转跳 - - 搜索结果分页 + - 搜索结果分页显示更多 3. 分类歌单 - [x] 更多功能 - [x] 分页功能 @@ -16,29 +16,33 @@ - 可评论 - 可喜爱 - 可回复评论 -5. 我的音乐 +5. 登陆 + - [x] 登陆步骤条 + - [x] 二维码过期提示 +6. 我的音乐 - 未登陆时登陆按钮 - - 关注页面 - - 粉丝页面 - - 个人信息显示 -6. 排行榜页面 + - [x] 关注页面 + - [x] 粉丝页面 + - [x] 个人信息显示 +7. 排行榜页面 - 按钮功能 - [x] 转跳 - [x] 标题展示 - [x] 榜单规则显示 - [x] 能去到 MV 页面 -7. mv 列表页 + - [x] 展示更新时间 +8. mv 列表页 - [x] 无限滚动 - [x] mv 详情播放页 -8. 大功能条 +9. 大功能条 - [x] 播放 - [x] 收藏 -9. 小功能条 - - [x] 播放 - - [x] 下载 - - [x] 分享 - - [x] 添加 -10. [x] 懒加载 +10. 小功能条 + - [x] 播放 + - [x] 下载 + - [x] 分享 + - [x] 添加 +11. [x] 懒加载 - [ ] 样式调整 - [ ] 组件抽离 diff --git a/README.md b/README.md index b4127d97ac806e052548a171571e6b7ea574b768..b0fded2b01e6c9831923d2bb51336eb3123527cf 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Some components use [element plus](https://github.com/element-plus/element-plus) API using [NeteaseCloudMusicApi](https://github.com/Binaryify/NeteaseCloudMusicApi) -Deploying with docker + nginx, [Preview address](http://47.100.89.214:8080/MusicLibrary) +Deploying with docker + nginx, [Project address](https://github.com/zlj-zz/yz-music) / [Preview address](http://47.100.89.214:8080/MusicLibrary) ![home](./demo/demo.gif) diff --git a/src/api/user.js b/src/api/user.js index 7e60a9b46e8fdf7d1dd47892da7f691b4c3c8c6b..69c5275df4a000dd6fc17ab44f5839bdaea3a540 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -10,3 +10,23 @@ export const getUserSubcount = () => requset.get("/user/subcount"); /* 登陆后使用, 获取用户喜爱歌曲 ID 列表 */ export const getUserLikeSongs = id => requset.get(`/likelist?uid=${id}`); + +/* 登陆后使用, 关注/取消关注用户 + * id : 用户 id + * t : 1为关注,其他为取消关注 + **/ +export const followUser = params => requset.get("follow", { params: params }); + +/* 登陆后使用, 获取用户关注列表 + * 必选参数 : uid : 用户 id + * limit : 返回数量 , 默认为 30 + * offset : 偏移数量,用于分页 ,如 :( 页数 -1)*30, 其中 30 为 limit 的值 , 默认为 0 */ +export const followsList = params => + requset.get("user/follows", { params: params }); + +/* + * 必选参数 : uid : 用户 id + * limit : 返回数量 , 默认为 30 + * lasttime : 返回数据的 lasttime ,默认-1,传入上一次返回结果的 lasttime,将会返回下一页的数据 */ +export const followedsList = params => + requset.get("/user/followeds", { params: params }); diff --git a/src/components/common/InfoList.vue b/src/components/common/InfoList.vue new file mode 100644 index 0000000000000000000000000000000000000000..f3864a197b8178f14c83501623d09b30bc0d9bad --- /dev/null +++ b/src/components/common/InfoList.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/src/components/common/LoginOpt.vue b/src/components/common/LoginOpt.vue index 26e92e89754707052b5905a101214f06543985f6..cb5960938a555596eb5706bd8445939ddb1d02b4 100644 --- a/src/components/common/LoginOpt.vue +++ b/src/components/common/LoginOpt.vue @@ -23,7 +23,7 @@ 登录 - + - @@ -322,8 +322,14 @@ export default { text-overflow: ellipsis; } .popup_user_data__lv { - white-space: nowrap; + /*white-space: nowrap;*/ margin-bottom: 6px; + overflow: hidden; + text-overflow: ellipsis; + display: box; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; } .popup_user_toolbar { padding: 13px 20px 6px; diff --git a/src/components/common/ModListMenu.vue b/src/components/common/ModListMenu.vue index b8eaa05e8e690bc593ad3b2ac4a1f8f835baaf2f..1c07725c48f23cd087b777fa9c3acc4f0a4812c3 100644 --- a/src/components/common/ModListMenu.vue +++ b/src/components/common/ModListMenu.vue @@ -8,6 +8,7 @@ class="list_menu__item list_menu__add" title="添加到歌单" aria-haspopup="true" + v-if="kind == 0" > diff --git a/src/views/musicLibrary/SongerDetail.vue b/src/views/musicLibrary/SongerDetail.vue index 8514456091fa75791358e10de268bb49e19669a3..15fd6960490537eedab73c736aba56f7abe450cd 100644 --- a/src/views/musicLibrary/SongerDetail.vue +++ b/src/views/musicLibrary/SongerDetail.vue @@ -51,7 +51,7 @@
{{ album.publishTime }}
- + 更多 @@ -79,7 +79,7 @@

- {{ mv.name }} + {{ mv.name }}

@@ -94,44 +94,12 @@
-
-
-

相似歌手

-
-
- -
-
+
import DetailInfoCard from "components/common/DetailInfoCard"; import DetailSonglist from "components/common/DetailSonglist"; +import InfoList from "components/common/InfoList"; import { getUserDetail, getSongerDetail, @@ -255,12 +224,16 @@ export default { playSonglist(songs); }); }, + songerClick(songer) { + gotoSongerDetail(songer.id); + }, gotoAlbumDetail, gotoSongerDetail, }, components: { DetailInfoCard, DetailSonglist, + InfoList, }, }; @@ -318,32 +291,6 @@ ul { padding-bottom: 0; } -.mod_singer_list { - overflow: hidden; - text-align: center; -} -.singer_list__list { - margin-right: -20px; - overflow: hidden; - zoom: 1; - margin-bottom: -24px; -} - -.singer_list__item { - float: left; - width: 20%; - margin-bottom: 20px; - overflow: hidden; -} -.singer_list__cover, -.singer_list__pic { - float: none; - display: block; - width: 140px; - height: 140px; - border-radius: 126px; -} - .mod_mv { height: 183px; } diff --git a/src/views/my/Followeds.vue b/src/views/my/Followeds.vue index 87d498d0caf957089744222d22594225755f44e1..03798e0c368c7589613150f1e07d963fc50693e7 100644 --- a/src/views/my/Followeds.vue +++ b/src/views/my/Followeds.vue @@ -1 +1,48 @@ - + + + diff --git a/src/views/my/Follows.vue b/src/views/my/Follows.vue index 0917bb4e3a1d63da36973c4d530bada47a4e59bc..7c2bca934aa3fe70364a49922b5f6dd47a1730da 100644 --- a/src/views/my/Follows.vue +++ b/src/views/my/Follows.vue @@ -1 +1,42 @@ - + + +