修复刚从线列表的歌曲无法批量添加、添加到我的列表后无法调整顺序等问题
parent
b0e2f44f01
commit
5aad81c696
|
@ -53,9 +53,6 @@ export default {
|
||||||
windowSizeActive(state) {
|
windowSizeActive(state) {
|
||||||
return windowSizeList.find(i => i.id === state.setting.windowSizeId) || windowSizeList[0]
|
return windowSizeList.find(i => i.id === state.setting.windowSizeId) || windowSizeList[0]
|
||||||
},
|
},
|
||||||
versionModalVisible(state) {
|
|
||||||
return state.version.showModal
|
|
||||||
},
|
|
||||||
pactModalVisible(state) {
|
pactModalVisible(state) {
|
||||||
return !state.setting.isAgreePact
|
return !state.setting.isAgreePact
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import music from '../../utils/music'
|
import music from '../../utils/music'
|
||||||
|
import { markRawList } from '@renderer/utils/vueTools'
|
||||||
const sourceList = {}
|
const sourceList = {}
|
||||||
const sources = []
|
const sources = []
|
||||||
const cache = new Map()
|
const cache = new Map()
|
||||||
|
@ -57,7 +58,7 @@ const actions = {
|
||||||
// ).then(result => commit('setList', { result, key }))
|
// ).then(result => commit('setList', { result, key }))
|
||||||
return music[source].leaderboard.getList(bangId, page).then(result => {
|
return music[source].leaderboard.getList(bangId, page).then(result => {
|
||||||
cache.set(key, result)
|
cache.set(key, result)
|
||||||
listInfo.list = result.list
|
listInfo.list = markRawList(result.list)
|
||||||
listInfo.total = result.total
|
listInfo.total = result.total
|
||||||
listInfo.limit = result.limit
|
listInfo.limit = result.limit
|
||||||
listInfo.page = result.page
|
listInfo.page = result.page
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import music from '../../utils/music'
|
import music from '../../utils/music'
|
||||||
|
import { markRawList } from '@renderer/utils/vueTools'
|
||||||
|
|
||||||
const sources = []
|
const sources = []
|
||||||
const sourceList = {}
|
const sourceList = {}
|
||||||
|
@ -150,7 +151,7 @@ const mutations = {
|
||||||
},
|
},
|
||||||
setList(state, datas) {
|
setList(state, datas) {
|
||||||
let source = state.sourceList[datas.source]
|
let source = state.sourceList[datas.source]
|
||||||
source.list = datas.list
|
source.list = markRawList(datas.list)
|
||||||
source.total = datas.total
|
source.total = datas.total
|
||||||
source.allPage = datas.allPage
|
source.allPage = datas.allPage
|
||||||
source.page = datas.page
|
source.page = datas.page
|
||||||
|
@ -164,7 +165,7 @@ const mutations = {
|
||||||
for (const source of results) {
|
for (const source of results) {
|
||||||
state.sourceMaxPage[source.source] = source.allPage
|
state.sourceMaxPage[source.source] = source.allPage
|
||||||
if (source.allPage < page) continue
|
if (source.allPage < page) continue
|
||||||
list.push(...source.list)
|
list.push(...markRawList(source.list))
|
||||||
pages.push(source.allPage)
|
pages.push(source.allPage)
|
||||||
total += source.total
|
total += source.total
|
||||||
// limit = Math.max(source.limit, limit)
|
// limit = Math.max(source.limit, limit)
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
import music from '../../utils/music'
|
import music from '../../utils/music'
|
||||||
|
import { markRawList } from '@renderer/utils/vueTools'
|
||||||
|
|
||||||
const sortList = {}
|
const sortList = {}
|
||||||
const sources = []
|
const sources = []
|
||||||
const cache = new Map()
|
const cache = new Map()
|
||||||
|
@ -125,7 +127,7 @@ const mutations = {
|
||||||
state.list.total = 0
|
state.list.total = 0
|
||||||
},
|
},
|
||||||
setList(state, { result, key, page }) {
|
setList(state, { result, key, page }) {
|
||||||
state.list.list = result.list
|
state.list.list = markRawList(result.list)
|
||||||
state.list.total = result.total
|
state.list.total = result.total
|
||||||
state.list.limit = result.limit
|
state.list.limit = result.limit
|
||||||
state.list.page = page
|
state.list.page = page
|
||||||
|
@ -133,7 +135,7 @@ const mutations = {
|
||||||
cache.set(key, result)
|
cache.set(key, result)
|
||||||
},
|
},
|
||||||
setListDetail(state, { result, key, source, id, page }) {
|
setListDetail(state, { result, key, source, id, page }) {
|
||||||
state.listDetail.list = result.list
|
state.listDetail.list = markRawList(result.list)
|
||||||
state.listDetail.id = id
|
state.listDetail.id = id
|
||||||
state.listDetail.source = source
|
state.listDetail.source = source
|
||||||
state.listDetail.total = result.total
|
state.listDetail.total = result.total
|
||||||
|
|
Loading…
Reference in New Issue