Browse Source

新书推荐修改

master
x_ying 3 years ago
parent
commit
9d33891220
  1. 16
      src/views/newBook.vue

16
src/views/newBook.vue

@ -28,16 +28,20 @@ export default {
this.getBookData() this.getBookData()
}, },
methods: { 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') console.log(res, 'res')
return res
res.newbookList.forEach(item => {
this.getCoverByISBN(item.isbn.replace(/\-/g, ''), item)
})
}).catch(() => { }).catch(() => {
this.$message.error('接口错误') this.$message.error('接口错误')
}) })
await res.forEach(item => {
this.getCoverByISBN(item.isbn.replace(/\-/g, ''), item)
})
}, },
getCoverByISBN(isbn, item) { getCoverByISBN(isbn, item) {
const params = { const params = {

Loading…
Cancel
Save