|
|
@ -28,16 +28,20 @@ export default { |
|
|
|
this.getBookData() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async getBookData() { |
|
|
|
const res = await FetchNewBookRecommend().then(res => { |
|
|
|
getBookData() { |
|
|
|
const params = { |
|
|
|
libcode: this.libcode, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 10 |
|
|
|
} |
|
|
|
FetchNewBookRecommend(params).then(res => { |
|
|
|
console.log(res, 'res') |
|
|
|
return res |
|
|
|
res.newbookList.forEach(item => { |
|
|
|
this.getCoverByISBN(item.isbn.replace(/\-/g, ''), item) |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('接口错误') |
|
|
|
}) |
|
|
|
await res.forEach(item => { |
|
|
|
this.getCoverByISBN(item.isbn.replace(/\-/g, ''), item) |
|
|
|
}) |
|
|
|
}, |
|
|
|
getCoverByISBN(isbn, item) { |
|
|
|
const params = { |
|
|
|