歌曲无封面时下载报错的问题

This commit is contained in:
lyswhut
2019-11-25 11:41:51 +08:00
parent fa6dead83d
commit cccfb6a08a
3 changed files with 12 additions and 17 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import { httpFetch } from '../../request'
export default {
getPic({ songmid }) {
const requestObj = httpFetch(`http://artistpicserver.kuwo.cn/pic.web?corp=kuwo&type=rid_pic&pictype=500&size=500&rid=${songmid}`)
requestObj.promise = requestObj.promise.then(({ body }) => body)
requestObj.promise = requestObj.promise.then(({ body }) => /^http/.test(body) ? body : null)
return requestObj
},
}