完善评论功能
parent
dec1b24c86
commit
93064bb18b
|
@ -17,9 +17,9 @@ div(:class="$style.player")
|
||||||
div(:class="$style.volumeMask" @mousedown="handleVolumeMsDown" ref="dom_volumeMask" :tips="`${$t('core.player.volume')}${parseInt(volume * 100)}%`")
|
div(:class="$style.volumeMask" @mousedown="handleVolumeMsDown" ref="dom_volumeMask" :tips="`${$t('core.player.volume')}${parseInt(volume * 100)}%`")
|
||||||
div(:class="$style.titleBtn" @click='toggleDesktopLyric' @contextmenu="handleToggleLockDesktopLyric" :tips="toggleDesktopLyricBtnTitle")
|
div(:class="$style.titleBtn" @click='toggleDesktopLyric' @contextmenu="handleToggleLockDesktopLyric" :tips="toggleDesktopLyricBtnTitle")
|
||||||
svg(v-if="setting.desktopLyric.enable" version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 512 512' space='preserve')
|
svg(v-if="setting.desktopLyric.enable" version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 512 512' space='preserve')
|
||||||
use(xlink:href='#icon-desktop-lyric-off')
|
|
||||||
svg(v-else version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 512 512' space='preserve')
|
|
||||||
use(xlink:href='#icon-desktop-lyric-on')
|
use(xlink:href='#icon-desktop-lyric-on')
|
||||||
|
svg(v-else version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' viewBox='0 0 512 512' space='preserve')
|
||||||
|
use(xlink:href='#icon-desktop-lyric-off')
|
||||||
div(:class="$style.titleBtn" @click='toggleNextPlayMode' :tips="nextTogglePlayName")
|
div(:class="$style.titleBtn" @click='toggleNextPlayMode' :tips="nextTogglePlayName")
|
||||||
svg(v-if="setting.player.togglePlayMethod == 'listLoop'" version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='80%' viewBox='0 0 24 24' space='preserve')
|
svg(v-if="setting.player.togglePlayMethod == 'listLoop'" version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='80%' viewBox='0 0 24 24' space='preserve')
|
||||||
use(xlink:href='#icon-list-loop')
|
use(xlink:href='#icon-list-loop')
|
||||||
|
|
|
@ -737,9 +737,6 @@ each(@themes, {
|
||||||
border-left-color: ~'@{color-@{value}-theme}';
|
border-left-color: ~'@{color-@{value}-theme}';
|
||||||
background-color: ~'@{color-@{value}-theme_2-background_1}';
|
background-color: ~'@{color-@{value}-theme_2-background_1}';
|
||||||
}
|
}
|
||||||
.leftControlBtns {
|
|
||||||
color: ~'@{color-@{value}-theme_2-font}';
|
|
||||||
}
|
|
||||||
.right {
|
.right {
|
||||||
&:before {
|
&:before {
|
||||||
background-image: linear-gradient(0deg,rgba(255,255,255,0) 0%,~'@{color-@{value}-theme_2-background_1}' 95%);
|
background-image: linear-gradient(0deg,rgba(255,255,255,0) 0%,~'@{color-@{value}-theme_2-background_1}' 95%);
|
||||||
|
@ -775,6 +772,14 @@ each(@themes, {
|
||||||
.lrc-active {
|
.lrc-active {
|
||||||
color: ~'@{color-@{value}-theme}';
|
color: ~'@{color-@{value}-theme}';
|
||||||
}
|
}
|
||||||
|
.footerLeftControlBtns {
|
||||||
|
color: ~'@{color-@{value}-theme_2-font}';
|
||||||
|
}
|
||||||
|
.footerLeftControlBtn {
|
||||||
|
&.active {
|
||||||
|
color: ~'@{color-@{value}-theme}';
|
||||||
|
}
|
||||||
|
}
|
||||||
.progress {
|
.progress {
|
||||||
background-color: ~'@{color-@{value}-player-progress}';
|
background-color: ~'@{color-@{value}-player-progress}';
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,8 +165,8 @@ export default {
|
||||||
this.isShowComment = true
|
this.isShowComment = true
|
||||||
this.currentMusicInfo = this.musicInfo
|
this.currentMusicInfo = this.musicInfo
|
||||||
|
|
||||||
|
if (this.page == 1) this.handleGetHotComment(this.currentMusicInfo)
|
||||||
this.handleGetNewComment(this.currentMusicInfo, this.page, this.limit)
|
this.handleGetNewComment(this.currentMusicInfo, this.page, this.limit)
|
||||||
this.handleGetHotComment(this.currentMusicInfo)
|
|
||||||
},
|
},
|
||||||
handleToggleCommentPage(page) {
|
handleToggleCommentPage(page) {
|
||||||
this.nextPage = page
|
this.nextPage = page
|
||||||
|
|
|
@ -14,7 +14,7 @@ export default {
|
||||||
})
|
})
|
||||||
const { body, statusCode } = await _requestObj.promise
|
const { body, statusCode } = await _requestObj.promise
|
||||||
if (statusCode != 200 || body.result !== 'ok') throw new Error('获取评论失败')
|
if (statusCode != 200 || body.result !== 'ok') throw new Error('获取评论失败')
|
||||||
console.log(body)
|
// console.log(body)
|
||||||
return { source: 'kw', comments: this.filterComment(body.rows), total: body.total, page, limit, maxPage: Math.ceil(body.total / limit) || 1 }
|
return { source: 'kw', comments: this.filterComment(body.rows), total: body.total, page, limit, maxPage: Math.ceil(body.total / limit) || 1 }
|
||||||
},
|
},
|
||||||
async getHotComment({ songmid }, page = 1, limit = 100) {
|
async getHotComment({ songmid }, page = 1, limit = 100) {
|
||||||
|
@ -31,6 +31,7 @@ export default {
|
||||||
return { source: 'kw', comments: this.filterComment(body.rows) }
|
return { source: 'kw', comments: this.filterComment(body.rows) }
|
||||||
},
|
},
|
||||||
filterComment(rawList) {
|
filterComment(rawList) {
|
||||||
|
if (!rawList) return []
|
||||||
return rawList.map(item => {
|
return rawList.map(item => {
|
||||||
let data = {
|
let data = {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
|
|
Loading…
Reference in New Issue