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

33
selfServiceMachine/src/views/bookRecommend.vue

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

2
selfServiceMachine/src/views/onlineBookSelection.vue

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

Loading…
Cancel
Save