diff --git a/src/api/base.js b/src/api/base.js index 9597259972edc494dbd87241fabf0a812d9b4ee2..12a73367d1bc700c1c13f15ba5bb1d7b4847a692 100644 --- a/src/api/base.js +++ b/src/api/base.js @@ -1,7 +1,7 @@ import axios from "axios"; -//const BASIC_URL = "http://zacharyzlj.cn:3000/"; -const BASIC_URL = "http://192.168.31.152:3000/"; +const BASIC_URL = "http://zacharyzlj.cn:3000/"; +//const BASIC_URL = "http://192.168.31.152:3000/"; function createBaseInstance() { const instance = axios.create({ baseURL: BASIC_URL, withCredentials: true }); diff --git a/src/api/playlist.js b/src/api/playlist.js index 32dedaf691d9b93df8927acce15e5aa1a79b1375..c47b82d83f94dad03cb608a186460b2e7ab0cc20 100644 --- a/src/api/playlist.js +++ b/src/api/playlist.js @@ -24,3 +24,9 @@ export const getCatList = () => requset.get("/playlist/catlist"); /* 登陆后使用 */ export const getUserPlaylists = id => requset.get(`/user/playlist?uid=${id}`); + +/* 收藏/取消收藏歌单 + * 登陆后使用 + * t : 类型,1:收藏,2:取消收藏 id : 歌单 id */ +export const toggleLikePlaylist = params => + requset.get("/playlist/subscribe", { params: params }); diff --git a/src/assets/css/fakeqqmusic.scss b/src/assets/css/fakeqqmusic.scss index a2bef0af34c7e12f2f8b7f3f45af6de37942ae82..3210ce240914d60a7a3dfe72c1310b4537bd2ac1 100644 --- a/src/assets/css/fakeqqmusic.scss +++ b/src/assets/css/fakeqqmusic.scss @@ -118,6 +118,10 @@ $black: #000; background-position: -40px -100px; vertical-align: -2px; } +.mod_btn__icon_like--like, +.mod_btn_green__icon_like--like { + background-position: 0 -80px; +} .mod_btn__icon_add, .mod_btn__icon_batch, .mod_btn__icon_comment, @@ -1304,6 +1308,14 @@ img .playlist__pic { background-position: 0 -150px; margin: 0 auto 16px; } +.popup_tips__icon_warn { + display: block; + width: 46px; + height: 46px; + margin: 0 auto 16px; + background-position: 0 -220px; + background-image: url(../img/icon_popup.png); +} .popup_tips__tit { font-size: 14px; color: $white; diff --git a/src/components/common/BlackTip.vue b/src/components/common/BlackTip.vue index da4972b01e71be424d9c713c8f7e4d19e3879eae..0f8ed83f3049a41d4e8e30bcf76db988a1cfc33f 100644 --- a/src/components/common/BlackTip.vue +++ b/src/components/common/BlackTip.vue @@ -5,7 +5,7 @@ style="z-index: 2147483647; left: 646px; top: 326px" :style="{ display: ifShow ? '' : 'none' }" > - + @@ -20,6 +20,22 @@ export default { type: String, default: "", }, + // 0: tip, 1: warn + iconType: { default: 0 }, + }, + methods: { + processIcon() { + switch (this.iconType) { + case 0: + return "popup_tips__icon"; + break; + case 1: + return "popup_tips__icon_warn"; + break; + default: + return ""; + } + }, }, }; diff --git a/src/components/common/DetailInfoCard.vue b/src/components/common/DetailInfoCard.vue index 155ba5b603ee55c5e261701294d8517c4d929a17..55f41cd5becbb26c29f5cfe2ad66b167c7a4313c 100644 --- a/src/components/common/DetailInfoCard.vue +++ b/src/components/common/DetailInfoCard.vue @@ -35,7 +35,7 @@
{{ obj.desc }}
- [更多] + [更多]