|
@ -35,7 +35,7 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { Swiper } from 'vue-awesome-swiper' |
|
|
import { Swiper } from 'vue-awesome-swiper' |
|
|
import 'swiper/swiper-bundle.css' |
|
|
import 'swiper/swiper-bundle.css' |
|
|
import { FetchNewBookRecommend, FetchCoverByISBN } from '@/api/inquiryMachine' |
|
|
|
|
|
|
|
|
import { FetchNewBookRecommend, FetchCoverByISBN, getBookDetailsByISBN } from '@/api/inquiryMachine' |
|
|
import BookDetails from './module/bookDetails.vue' |
|
|
import BookDetails from './module/bookDetails.vue' |
|
|
export default { |
|
|
export default { |
|
|
name: 'NewBookRecommend', |
|
|
name: 'NewBookRecommend', |
|
@ -63,13 +63,18 @@ export default { |
|
|
spaceBetween: 20, |
|
|
spaceBetween: 20, |
|
|
centeredSlides: true, |
|
|
centeredSlides: true, |
|
|
observer: true, |
|
|
observer: true, |
|
|
loop: true, |
|
|
|
|
|
|
|
|
// loop: true, |
|
|
centeredSlidesBounds: true, |
|
|
centeredSlidesBounds: true, |
|
|
watchSlidesVisibility: true, |
|
|
watchSlidesVisibility: true, |
|
|
navigation: { |
|
|
navigation: { |
|
|
nextEl: '.next-btn', |
|
|
nextEl: '.next-btn', |
|
|
prevEl: '.prev-btn' |
|
|
prevEl: '.prev-btn' |
|
|
} |
|
|
} |
|
|
|
|
|
// on: { |
|
|
|
|
|
// click: function() { |
|
|
|
|
|
// alert(this.clickedIndex) |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
@ -97,9 +102,13 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 详情 |
|
|
// 详情 |
|
|
handleDetails(index) { |
|
|
handleDetails(index) { |
|
|
console.log(index) |
|
|
|
|
|
this.$refs.detailDom.bookData = this.rankingList[index] |
|
|
|
|
|
this.$refs.detailDom.dialogVisible = true |
|
|
|
|
|
|
|
|
const params = { |
|
|
|
|
|
isbn: this.rankingList[index].isbn.replace(/\-/g, '') |
|
|
|
|
|
} |
|
|
|
|
|
getBookDetailsByISBN(params).then(res => { |
|
|
|
|
|
this.$refs.detailDom.bookData = res |
|
|
|
|
|
this.$refs.detailDom.dialogVisible = true |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|