完善聚合搜索逻辑
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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',
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user