完善聚合搜索逻辑

This commit is contained in:
lyswhut
2019-09-21 13:41:19 +08:00
parent c12bbc7f0f
commit ef9eb83a75
5 changed files with 58 additions and 43 deletions
+1
View File
@@ -43,6 +43,7 @@ export const b64DecodeUnicode = str => {
export const decodeName = str => str.replace(/'/g, '\'')
export const scrollTo = (element, to, duration = 300, fn = function() {}) => {
if (!element) return
const start = element.scrollTop || element.scrollY
const change = to - start
const increment = 10
+2 -1
View File
@@ -121,7 +121,7 @@ export default {
}
return result
},
search(str, page = 1, { limit }) {
search(str, page = 1, { limit } = {}) {
if (limit != null) this.limit = limit
// http://newlyric.kuwo.cn/newlyric.lrc?62355680
return this.musicSearch(str, page).then(result => {
@@ -138,6 +138,7 @@ export default {
list,
allPage: this.allPage,
total: this.total,
limit: this.limit,
source: 'kw',
})
})