Browse Source

图书推荐设备调试修改

master
xuhuajiao 1 year ago
parent
commit
ad3f5899b8
  1. 13
      selfServiceMachine/src/assets/styles/index.scss
  2. 33
      selfServiceMachine/src/views/bookRecommend.vue
  3. 2
      selfServiceMachine/src/views/onlineBookSelection.vue

13
selfServiceMachine/src/assets/styles/index.scss

@ -13,7 +13,7 @@
//c-s壳占位
.top-bg{
height: 60px;
height: 90px;
background-color: #3F92F6;
}
@ -21,7 +21,7 @@
.online-active{
position: relative;
width: 100%;
height: calc(1920px - 60px);
height: calc(100vh);
background: url('~@/assets/images/online.png') no-repeat left top;
background-size: 100% 100%;
.qrcode{
@ -35,7 +35,7 @@
}
.recommend-main{
width: 100%;
height: calc(100vh - 60px);
height: calc(100vh);
background-color: #F4F4FC;
overflow: hidden;
.banner{
@ -51,7 +51,7 @@
.recommend-cont{
display: flex;
justify-content: space-between;
height: calc(100% - 372px - 44px);
height: calc(100% - 372px - 42px);
padding: 0 24px;
}
.recommend-left{
@ -59,6 +59,7 @@
height: 100%;
padding: 24px 16px 0 16px;
background-color: #fff;
border-radius: 8px;
.filter-header{
position: relative;
padding-left: 20px;
@ -342,7 +343,7 @@
padding: 20px 24px;
background-color: #fff;
border-radius: 8px;
height: calc(100vh - 698px);
height: calc(100vh - 636px);
// height: calc(100vh - 20px);
overflow: hidden;
overflow-y: scroll;
@ -358,7 +359,7 @@
.recommend-item{
margin-top: 20px;
padding-bottom: 22px;
padding-bottom: 24px;
}
.book-detail{

33
selfServiceMachine/src/views/bookRecommend.vue

@ -1,6 +1,6 @@
<template>
<div id="book">
<div class="top-bg"></div>
<!-- <div class="top-bg"></div> -->
<div class="recommend-main">
<div class="banner">
<img src="~@/assets/images/banner.png" alt="" />
@ -58,12 +58,12 @@
<span class="detail-btn" @click="getBookDetail(item)">查看详情</span>
</div>
</div>
<ul class="ranking-list-bottom">
<!-- <ul class="ranking-list-bottom">
<li v-for="(item,index) in rankingOther" :key="index" @click="getBookDetail(item)">
<span>TOP4</span>
<p class="title-item-only">{{ item.bookName }}</p>
</li>
</ul>
</ul> -->
</div>
</div>
<div class="recommend-right">
@ -159,7 +159,7 @@
<span>{{ detailData.publish }}</span>
<span>ISBN{{ detailData.isbn }}</span>
</div>
<div class="book-intro title-item">
<div class="book-intro">
{{ detailData.introduce }}
</div>
</div>
@ -279,7 +279,7 @@ export default {
publish: null,
createdDate: null
}
this.pageIndex = 0
this.pageIndex = 1
this.hasNextPage = true
this.keyword = ''
this.bookList = []
@ -301,7 +301,7 @@ export default {
publish: null,
createdDate: null
}
this.pageIndex = 0
this.pageIndex = 1
this.hasNextPage = true
this.bookList = []
switch(this.selectValue){
@ -335,7 +335,6 @@ export default {
'createdDate':this.query.createdDate
}
FetchBookRecommendList(params).then(res => {
console.log(res)
this.publish = res.publishGroup
this.publishDate = res.createdDateGroup
this.topThree = res.clickTop10.slice(0, 3)
@ -347,13 +346,14 @@ export default {
}else{
this.hasNextPage = true
}
this.totalNum = res.page.totalRows
this.totalPages = res.page.totalPages;
if (this.pageIndex < 1) {
this.bookList = resData;
}
this.bookList = this.bookList.concat(resData)
if (this.pageIndex > res.page.totalPages) {
this.hasNextPage = false
}
}).catch(() => {
this.$message.error('接口错误')
})
@ -384,31 +384,30 @@ export default {
//
addMoreData() {
if (this.hasNextPage) {
this.pageIndex ++;
if(this.pageIndex > this.totalPages){
this.hasNextPage = false
}
this.getBookRecommendList()
this.pageIndex ++;
}
},
selectPublic(index){
this.resetData()
this.selectedDateIndex = null
if (this.selectedIndex === index) {
this.selectedIndex = null
this.query.publish = null
} else {
this.selectedIndex = index;
this.selectedIndex = index
this.query.publish = this.publish[index].publish
}
this.addMoreData()
},
selectDate(index){
this.resetData()
this.selectedIndex = null
if (this.selectedDateIndex === index) {
this.selectedDateIndex = null;
this.selectedDateIndex = null
this.query.createdDate = null
} else {
this.selectedDateIndex = index;
this.selectedDateIndex = index
this.query.createdDate = this.publishDate[index]
}
this.addMoreData()

2
selfServiceMachine/src/views/onlineBookSelection.vue

@ -1,6 +1,6 @@
<template>
<div id="book">
<div class="top-bg"></div>
<!-- <div class="top-bg"></div> -->
<div class="online-active">
<div class="qrcode" id="qrCodeUrl"></div>
</div>

Loading…
Cancel
Save