修复在线音乐列表获取失败时无限循环请求的问题

This commit is contained in:
lyswhut
2020-01-13 12:49:09 +08:00
parent e4c19c0f2a
commit 914e738931
8 changed files with 25 additions and 17 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ export default {
this._requestObj_list = httpFetch(this.getListUrl({ sortId, id, type, page }))
return this._requestObj_list.promise.then(({ body }) => {
if (!id || type == '10000') {
if (body.code !== this.successCode) return this.getList(sortId, id, type, page, ++tryNum)
if (body.code !== this.successCode) return this.getList(sortId, tagId, page, ++tryNum)
return {
list: this.filterList(body.data.data),
total: body.data.total,