|
|
@ -47,7 +47,6 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
// this.rankingList = data.ranking |
|
|
|
this.getBookList() |
|
|
|
}, |
|
|
|
mounted() { |
|
|
@ -74,17 +73,17 @@ export default { |
|
|
|
}, |
|
|
|
getBookList() { |
|
|
|
FetchNewBookRecommend().then(res => { |
|
|
|
console.log(res, 'res') |
|
|
|
this.rankingList = res |
|
|
|
this.rankingList.forEach(item => { |
|
|
|
this.getCoverByISBN(item.isbn.replace(/\-/g, '')) |
|
|
|
if (this.coverUrl) { |
|
|
|
item.coverUrl = this.coverUrl |
|
|
|
} else { |
|
|
|
item.coverUrl = '' |
|
|
|
} |
|
|
|
this.coverUrl = null |
|
|
|
}) |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('接口错误') |
|
|
|
}) |
|
|
|
}, |
|
|
|