This commit is contained in:
@fawn-nine
2023-09-28 13:31:04 +08:00
parent 9772322df5
commit c785f36086
7 changed files with 367 additions and 298 deletions

View File

@@ -1,6 +1,6 @@
<template> <template>
<view style="background-color: #fff;padding: 30rpx;"> <view style="background-color: #fff;padding: 30rpx;">
<z-nav-bar title="电子书详情"></z-nav-bar> <z-nav-bar title="书详情"></z-nav-bar>
<view class="book_neir flexbox"> <view class="book_neir flexbox">
<view class="bn_img"> <view class="bn_img">
<img :src="bookMessage.images" mode="scaleToFill"> <img :src="bookMessage.images" mode="scaleToFill">

View File

@@ -1,26 +1,26 @@
<template> <template>
<view> <view>
<!-- 公共组件-每个页面必须引入 --> <!-- 公共组件-每个页面必须引入 -->
<!-- <public-module></public-module> --> <!-- <public-module></public-module> -->
<!-- <z-nav-bar title="我的图书"></z-nav-bar> --> <!-- <z-nav-bar title="我的图书"></z-nav-bar> -->
<view class="home_bg"> <view class="home_bg">
<view class="" style=" "> <view class="" style=" ">
<view class="icon_hua"> <view class="icon_hua">
<image src="../../static/icon/home_icon_3.png" mode="aspectFit" class="icon_hua_1"></image> <image src="../../static/icon/home_icon_3.png" mode="aspectFit" class="icon_hua_1"></image>
</view> </view>
<view class="hehan"> <view class="hehan">
<image src="../../static/icon/hehan.png" mode="aspectFit" class="icon_hua_1"></image> <image src="../../static/icon/hehan.png" mode="aspectFit" class="icon_hua_1"></image>
</view> </view>
<view class="search_box flexbox" @click="onPageJump('../peanut/searchFor')"> <view class="search_box flexbox" @click="onPageJump('../peanut/searchFor')">
<view class="search"> <view class="search">
<text class="icon_search"></text> <text class="icon_search"></text>
<text class="prompt">请输入想要搜索的书名</text> <text class="prompt">请输入想要搜索的书名</text>
</view> </view>
</view> </view>
<!-- <view class="searBtn flexbox"> <!-- <view class="searBtn flexbox">
<text>搜索</text> <text>搜索</text>
</view> --> </view> -->
</view> </view>
<!-- <view class="home_lunbo"> <!-- <view class="home_lunbo">
<u-swiper :list="list3" indicator indicatorMode="line" circular style="height: 180rpx;"></u-swiper> <u-swiper :list="list3" indicator indicatorMode="line" circular style="height: 180rpx;"></u-swiper>
</view> --> </view> -->
@@ -29,103 +29,69 @@
<u-tabs :scrollable="false" bg-color="#d4d4d4" active-color="#2979ff" inactive-color="#606266" bar-height="10" :list="contentButtonList" @click="contentButtonClick" lineWidth="42" :inactiveStyle="{fontSize:'32rpx'}" :activeStyle="{color: '#303133',fontWeight: 'bold', transform: 'scale(1.01)'}"></u-tabs> <u-tabs :scrollable="false" bg-color="#d4d4d4" active-color="#2979ff" inactive-color="#606266" bar-height="10" :list="contentButtonList" @click="contentButtonClick" lineWidth="42" :inactiveStyle="{fontSize:'32rpx'}" :activeStyle="{color: '#303133',fontWeight: 'bold', transform: 'scale(1.01)'}"></u-tabs>
</view> --> </view> -->
<view class="" style="padding: 20rpx;"> <view class="" style="padding: 20rpx;">
<view class="mytabs flexbox"> <view class="mytabs flexbox">
<view :class="['item','item1', contentShow == 1 ? 'active' :'']" @click="setData(1)"> <view :class="['item','item1', contentShow == 1 ? 'active' :'']" @click="setData(1)">
已购图书 已购图书
</view> </view>
<view :class="['item','item2', contentShow == 2 ? 'active' :'']" @click="setData(2)"> <view :class="['item','item2', contentShow == 2 ? 'active' :'']" @click="setData(2)">
推荐图书 推荐图书
</view>
</view> </view>
</view> </view>
</view> <view class="listenList">
<view class="listenList" > <view class="wrap" v-if="contentShow == 1">
<view class="wrap" v-if="contentShow == 1"> <view class="" v-if="bookList.length > 0">
<view class="" v-if="bookList.length > 0">
<u-row gutter="16" justify="flex-start"> <u-row gutter="16" justify="flex-start">
<u-col span="6" v-for="(item,index) in bookList" :key="index"> <u-col span="4" v-for="(item,index) in bookList" :key="index">
<view > <view class=" listenItem">
<view class="flexbox listenItem"> <view class="" @click="goDetail(item)">
<view class="info"> <image v-if="item.images != '' && item.images != null" :src="item.images" mode="scaleToFill"></image>
<view class="videoBox demo-layout bg-purple" @click="goToListenFree(item)"> <image v-else src="../../static/icon/wufeng.jpg" mode="scaleToFill"></image>
<image :src="item.image" mode="scaleToFill" ></image>
</view>
</view>
<view class="btns">
<!-- <view class="item flexbox" @click="">
<u-icon name="bookmark" color="#55aaff" size="24"></u-icon>
<image src="../../static/icon/tu1.png" mode="aspectFit"></image>
<text > </text>
</view> -->
<view class="item flexbox" @click="goToListenFree(item)">
<!-- <u-icon name="volume" color="#71d5a1" size="24"></u-icon> -->
<image src="../../static/icon/tu2.png" mode="aspectFit"></image>
<text> </text>
</view>
<view class="item flexbox" @click="goPingshu(item.bookId)">
<!-- <u-icon name="chat" color="#fcbd71" size="24"></u-icon> -->
<image src="../../static/icon/tu3.png" mode="aspectFit"></image>
<text> </text>
</view> </view>
<view class="bookName">{{item.name}}</view>
</view> </view>
</view> </u-col>
<view class="bookName">{{item.bookName}}</view>
</view>
</u-col>
</u-row> </u-row>
<view> <view>
<view v-if="status==0" style="text-align: center;"> <view v-if="status==0" style="text-align: center;">
<u-loading-icon style="display: inline-block;"></u-loading-icon> <u-loading-icon style="display: inline-block;"></u-loading-icon>
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font> <font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中
</font>
</view> </view>
<view v-if="status==1"> <view v-if="status==1">
<u-divider text="全部加载完成"></u-divider> <u-divider text="全部加载完成"></u-divider>
</view> </view>
</view>
</view> </view>
<u-divider v-else text="暂无已购买图书~"></u-divider> </view>
</view> <u-divider v-else text="暂无已购买图书~"></u-divider>
<view class="wrap" v-if="contentShow == 2"> </view>
<view class="" v-if="tjBookLIst.length > 0"> <view class="wrap" v-if="contentShow == 2">
<u-row gutter="16" justify="flex-start" > <view class="" v-if="tjBookLIst.length > 0">
<u-col span="6" v-for="(item,index) in tjBookLIst" :key="index"> <u-row gutter="16" justify="flex-start">
<view class="flexbox listenItem"> <u-col span="4" v-for="(item,index) in tjBookLIst" :key="index">
<view class="info"> <view class=" listenItem">
<view class="videoBox demo-layout bg-purple" @click="goDetail(item)"> <view class="" @click="goDetail(item)">
<image :src="item.images" mode="scaleToFill" ></image> <image v-if="item.images != '' && item.images != null" :src="item.images" mode="scaleToFill"></image>
</view> <image v-else src="../../static/icon/wufeng.jpg" mode="scaleToFill"></image>
</view>
<view class="btns">
<view class="item flexbox" @click="goDetail(item)">
<image src="../../static/icon/tu1.png" mode="aspectFit"></image>
<text> </text>
</view>
<view class="item flexbox" @click="goToListen(item)">
<image src="../../static/icon/tu2.png" mode="aspectFit"></image>
<text> </text>
</view>
<view class="item flexbox" @click="wgGoPingshu(item)">
<image src="../../static/icon/tu3.png" mode="aspectFit"></image>
<text> </text>
</view>
</view>
</view> </view>
<view class="bookName">{{item.name}}</view> <view class="bookName"><text>{{item.name}}</text></view>
</u-col>
</u-row>
<view>
<view v-if="tjstatus==0" style="text-align: center;">
<u-loading-icon style="display: inline-block;"></u-loading-icon>
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
</view>
<view v-if="tjstatus==1">
<u-divider text="全部加载完成"></u-divider>
</view> </view>
</u-col>
</u-row>
<view>
<view v-if="tjstatus==0" style="text-align: center;">
<u-loading-icon style="display: inline-block;"></u-loading-icon>
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中
</font>
</view>
<view v-if="tjstatus==1">
<u-divider text="全部加载完成"></u-divider>
</view> </view>
</view> </view>
<u-divider v-else text="暂无推荐图书~"></u-divider> </view>
</view> <u-divider v-else text="暂无推荐图书~"></u-divider>
</view> </view>
</view>
<!-- <view class="shuwuLink"> <!-- <view class="shuwuLink">
<image @click="" src="../../static/icon/shuwu.jpg" mode="aspectFit"></image> <image @click="" src="../../static/icon/shuwu.jpg" mode="aspectFit"></image>
</view> --> </view> -->
@@ -135,7 +101,7 @@
</template> </template>
<script> <script>
import musicPlay from '@/components/music.vue' import musicPlay from '@/components/music.vue'
import { import {
mapState mapState
} from 'vuex'; } from 'vuex';
@@ -147,18 +113,18 @@
'../../static/icon/home_ban_2.jpg', '../../static/icon/home_ban_2.jpg',
'../../static/icon/home_ban_3.jpg', '../../static/icon/home_ban_3.jpg',
], ],
showEbook:false, showEbook: false,
playData:{}, playData: {},
loadingNow : false, loadingNow: false,
bookList:[], bookList: [],
contentShow:1, contentShow: 1,
page:1, // 页码 page: 1, // 页码
status: 3, status: 3,
ygtotalPage:1, totalPage: 1,
tjPage:1, tjPage: 1,
tjstatus:3, tjstatus: 3,
tjTotalPage:1, tjTotalPage: 1,
tjBookLIst:[], tjBookLIst: [],
contentButtonList: [{ contentButtonList: [{
name: '已购图书' name: '已购图书'
}, },
@@ -169,14 +135,14 @@
} }
}, },
onLoad() { onLoad() {
}, },
onHide() { onHide() {
// this.contentShow = 1 // this.contentShow = 1
this.page = 1 this.page = 1
this.tjPage = 1 this.tjPage = 1
this.bookList = [] this.bookList = []
this.tjBookLIst = [] this.tjBookLIst = []
}, },
onShow() { onShow() {
this.getListDate() this.getListDate()
@@ -184,144 +150,146 @@
}, },
onPullDownRefresh() { onPullDownRefresh() {
console.log('下拉刷新了') console.log('下拉刷新了')
uni.stopPullDownRefresh(); // this.contentShow = 1
this.contentShow = 1
this.page = 1 this.page = 1
this.tjPage = 1 this.tjPage = 1
this.bookList = [] this.bookList = []
this.getfreeBook() this.getfreeBook()
this.tjBookLIst = [] this.tjBookLIst = []
this.getListDate() this.getListDate()
uni.stopPullDownRefresh();
}, },
onReachBottom() { onReachBottom() {
// this.loadingNow = true // this.loadingNow = true
console.log('到底了') console.log('到底了')
if (this.contentShow == 1) {
if(this.contentShow == 1){ if (this.page+1 <= this.totalPage) {
//console.log(this.page , this.ygtotalPage) this.page++
// if(this.page < this.ygtotalPage){ this.status = 0
// this.page++ this.getfreeBook()
// console.log('加载',this.page) } else {
// this.status = 0 this.status = 1
// this.getfreeBook() }
// }else{ } else if (this.contentShow == 2) {
// this.status = 1 if (this.tjPage + 1 <= this.tjTotalPage) {
// console.log('加载完成了',this.page)
// return
// }
}else if(this.contentShow == 2){
if(this.tjPage+1 < this.tjTotalPage){
this.tjPage++ this.tjPage++
// console.log('加载',this.tjPage) // console.log('加载',this.tjPage)
this.tjstatus = 0 this.tjstatus = 0
this.getListDate() this.getListDate()
}else{ } else {
this.tjstatus = 1 this.tjstatus = 1
} }
} }
}, },
components:{ components: {
musicPlay musicPlay
}, },
computed: { computed: {
...mapState(['userInfo']) ...mapState(['userInfo'])
}, },
methods: { methods: {
setData(e){ setData(e) {
this.contentShow = e this.contentShow = e
}, },
// 未购买图书,评书跳转 // 未购买图书,评书跳转
wgGoPingshu(item){ wgGoPingshu(item) {
console.log('未购买评书',item) console.log('未购买评书', item)
uni.navigateTo({ uni.navigateTo({
url: '../comments/comments?bookid='+item.id, url: '../comments/comments?bookid=' + item.id,
// url:'../bookShop/commodityDetail' // url:'../bookShop/commodityDetail'
}); });
}, },
// 跳转到评书 // 跳转到评书
goPingshu(val){ goPingshu(val) {
console.log('评书',val) console.log('评书', val)
uni.navigateTo({ uni.navigateTo({
url: '../comments/comments?bookid='+val, url: '../comments/comments?bookid=' + val,
}); });
}, },
contentButtonClick(e){ contentButtonClick(e) {
this.contentShow = e.index this.contentShow = e.index
}, },
// 获取已购买书籍 // 获取已购买书籍
getfreeBook(){ getfreeBook() {
this.$http this.$http
.post('book/userebookbuy/buylist', { .post('book/book/getMyBooks', {
// .post('book/buyorderdetail/querybuy', { // .post('book/buyorderdetail/querybuy', {
'id': this.userInfo.id, 'userId': this.userInfo.id,
'page':this.page, 'page': this.page,
'limit':10 'limit': 10
}) })
.then(res => { .then(res => {
if(res.code == 0){ if (res.code == 0) {
// this.ygtotalPage = res.page.totalPage console.log(res, '获取已购买书籍')
//var arr = res.page if (res.page.records.length > 0) {
this.bookList = res.page this.bookList = this.bookList.concat(res.page.records)
console.log(res,'获取已购买书籍') this.totalPage = res.page.pages
// this.status = 3 if(this.page == this.totalPage){
} this.status = 1
}else{
this.status = 3
}
} else {
this.bookList = []
}
}
}); });
}, },
// 获取推荐图书(未购买) // 获取推荐图书(未购买)
getListDate(){ getListDate() {
this.loadingNow = false this.loadingNow = false
// 获取书架列表 // 获取书架列表
this.$http this.$http
.post('book/book/getBestBooks', { .post('book/book/getBestBooks', {
'userId': this.userInfo.id, 'userId': this.userInfo.id,
'limit':10, 'limit': 10,
'page':this.tjPage 'page': this.tjPage
}) })
.then(res => { .then(res => {
console.log(res,'获取推荐图书(未购买)') console.log(res, '获取推荐图书(未购买)')
if(res.code == 0){ if (res.code == 0) {
// this.tjTotalPage = res.pages.totalPage // this.tjTotalPage = res.pages.totalPage
var arr = [] var arr = []
if(res.page.records.length > 0){ if (res.page.records.length > 0) {
this.tjBookLIst = this.tjBookLIst.concat(res.page.records) this.tjBookLIst = this.tjBookLIst.concat(res.page.records)
this.tjTotalPage = res.page.pages this.tjTotalPage = res.page.pages
this.tjstatus = 3 this.tjstatus = 3
}else{ } else {
this.tjBookLIst = [] this.tjBookLIst = []
this.tjTotalPage = 1 this.tjTotalPage = 1
}
} }
}
}); });
}, },
// 跳转详情页 // 跳转详情页
goDetail(item) { goDetail(item) {
console.log(item,'goDetail-----') console.log(item, 'goDetail-----')
uni.navigateTo({ uni.navigateTo({
url: '../eBook/bookContent?Id=' + item.id url: '../eBook/bookContent?Id=' + item.id
// url: '../bookShop/commodityDetail?id=' + item.id // url: '../bookShop/commodityDetail?id=' + item.id
}); });
}, },
goToListen(item){ goToListen(item) {
console.log(item,'item') console.log(item, 'item')
uni.navigateTo({ uni.navigateTo({
url: "../listen/listen?bookid="+item.id url: "../listen/listen?bookid=" + item.id
}); });
}, },
// 跳转到听书详情 // 跳转到听书详情
goToListenFree(item){ goToListenFree(item) {
// console.log(item,'item') // console.log(item,'item')
uni.navigateTo({ uni.navigateTo({
url: "../listen/listen?bookid="+item.bookId+"&fengImg="+item.image // 前台播放版本 url: "../listen/listen?bookid=" + item.bookId + "&fengImg=" + item.image // 前台播放版本
}); });
}, },
// 跳转11 // 跳转11
@@ -336,83 +304,147 @@
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/style/mixin.scss'; @import '@/style/mixin.scss';
.hehan{width: 50%; margin: 0 auto;}
.hehan {
width: 50%;
margin: 0 auto;
}
.home_lunbo { .home_lunbo {
margin: 40rpx 30rpx 0 30rpx; margin: 40rpx 30rpx 0 30rpx;
} }
.mytabs{
.mytabs {
// background: url('@/static/icon/bgtushu.png') no-repeat left top; // background: url('@/static/icon/bgtushu.png') no-repeat left top;
height:110rpx ; margin-bottom: 50rpx; height: 80rpx;
.item{ margin-bottom: 30rpx;
border-radius: 10rpx;background-color: #adb6b7; width: 48%; margin: 0 10rpx; text-align: center; color:#fff ; font-size: 36rpx; line-height:110rpx ;
} .item {
.item.active{ border-radius: 10rpx;
background-color: #73837b; background-color: #c6ead0;
width: 48%;
margin: 0 10rpx;
text-align: center;
color: #3c7f56;
font-size: 36rpx;
line-height: 80rpx;
} }
.item1{
background-color: #adb6b7; .item.active {
background-color: #3c7f56;
color: #fff;
}
.item1 {
// background-color: #adb6b7;
} }
} }
.listenItem{
.btns{margin-top: 60rpx; margin-left: 20rpx; font-size: 34rpx; justify-content: space-between; .listenItem {
.item{ margin-bottom:30rpx;
image{ image {
width: 24px !important;height:24px;display: block; margin-right: 10rpx; width: 100%;
} height: 280rpx;
} border-radius: 20rpx;
} }
.info{width: 50%;
image{width:100% ; height: 280rpx; border-radius: 20rpx;} }
.shuwuLink {
padding: 0 20rpx;
image {
border-radius: 30rpx;
} }
} }
.shuwuLink{ padding: 0 20rpx;
image{border-radius: 30rpx;} .contentButton {
margin: 50rpx 0;
} }
.contentButton{margin:50rpx 0;}
.quesheng {
.quesheng{text-align: center; margin-top: 100rpx; color: #8b8a91;} text-align: center;
.bookName{ margin-top:10rpx; display: block; margin-top: 100rpx;
white-space: nowrap; font-weight: bold; color: #8b8a91;
}
.bookName {
margin-top: 10rpx;
display: block;
white-space: nowrap;
// font-weight: bold;
overflow-x: hidden; overflow-x: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
font-size: 30rpx; color: #333; padding: 10rpx 0; font-size: 30rpx;
color: #333;
padding: 10rpx 0;
} }
// .videoBox{position: relative;} // .videoBox{position: relative;}
.playButton{position: absolute; z-index: 1; right: 4px; bottom: 4px; padding: 5px; border-radius: 100%; } .playButton {
uni-image { position: absolute;
width:auto !important; z-index: 1;
height: 350rpx; right: 4px;
bottom: 4px;
padding: 5px;
border-radius: 100%;
} }
.u-row{flex-wrap: wrap;}
.u-col{overflow: hidden; margin-bottom: 30rpx; overflow: hidden;} uni-image {
.listenList{padding: 10rpx; box-sizing: border-box; width: calc(100% - 10rpx);} width: auto !important;
.flexbox{display: flex;} height: 350rpx;
}
.u-row {
flex-wrap: wrap;
}
.u-col {
overflow: hidden;
margin-bottom: 30rpx;
overflow: hidden;
}
.listenList {
padding: 10rpx;
box-sizing: border-box;
width: calc(100% - 10rpx);
}
.flexbox {
display: flex;
}
.scroll-Y { .scroll-Y {
height: 300rpx; height: 300rpx;
} }
.scroll-view_H {
white-space: nowrap; .scroll-view_H {
width: 100%; white-space: nowrap;
} width: 100%;
.scroll-view-item { }
height: 300rpx;
line-height: 300rpx; .scroll-view-item {
text-align: center; height: 300rpx;
font-size: 36rpx; line-height: 300rpx;
} text-align: center;
.scroll-view-item_H { font-size: 36rpx;
display: inline-block; }
width: 60%;
height: 300rpx; .scroll-view-item_H {
line-height: 300rpx; display: inline-block;
text-align: center; width: 60%;
font-size: 36rpx; height: 300rpx;
} line-height: 300rpx;
text-align: center;
font-size: 36rpx;
}
.head_line { .head_line {
margin: 50rpx 0; margin: 50rpx 0;
b { b {
display: inline-block; display: inline-block;
width: 12rpx; width: 12rpx;
@@ -421,12 +453,12 @@
vertical-align: bottom; vertical-align: bottom;
margin: 0 20rpx 0 0; margin: 0 20rpx 0 0;
} }
text { text {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
} }
i { i {
float: right; float: right;
font-style: normal; font-style: normal;
@@ -435,54 +467,82 @@
margin: 5rpx 35rpx 0 0; margin: 5rpx 35rpx 0 0;
} }
} }
.home_bg { .home_bg {
background-image: url('@/static/icon/home_bg.jpg'); background-image: url('@/static/icon/home_bg.jpg');
background-position: center center; background-position: center center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
padding: 20rpx; padding: 20rpx;
position: relative; margin-bottom:60rpx; position: relative;
// height: 400rpx; margin-bottom: 130rpx; margin-bottom: 30rpx;
.icon_hua_1 {
// margin: 0 auto; // height: 400rpx; margin-bottom: 130rpx;
width: 100%; text-align: center; .icon_hua_1 {
// margin: 0 auto;
width: 100%;
text-align: center;
height: 150rpx;
image {
width: 150rpx;
height: 150rpx; height: 150rpx;
image{width: 150rpx; height: 150rpx;}
} }
.icon_hua{width: 100%; text-align: center; display: block; }
image{width: 150rpx; height: 150rpx; margin: 0 auto;}
.icon_hua {
width: 100%;
text-align: center;
display: block;
image {
width: 150rpx;
height: 150rpx;
margin: 0 auto;
} }
.search_box { margin: 0 auto; margin-top: 20rpx; align-items: center; }
width: calc(100% - 30rpx); margin-top: 0;
margin-bottom: 20rpx; .search_box {
margin: 0 auto;
.search{height: 80upx; margin-top: 20rpx;
display: flex; align-items: center;
width: 100%; width: calc(100% - 30rpx);
align-items: center; margin-top: 0;
padding: 0upx 40upx; margin-bottom: 20rpx;
background-color: #fff;
border-radius: 20upx; .search {
box-shadow: 0 0px 10px 1px #54a96633; height: 56upx;
} display: flex;
.prompt { width: 100%;
color: #838383; font-size: 24rpx; align-items: center;
padding: 0upx 40upx;
} background-color: #fff;
border-radius: 20upx;
.icon_search { box-shadow: 0 0px 10px 1px #54a96633;
background-image: url('@/static/icon/map_ic_search.png');
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
width:36upx;
height: 36upx;
margin-right: 20upx;
}
} }
.searBtn{
width: 80rpx; align-items: center; .prompt {
font-size: 30rpx; color: #fff; color: #838383;
font-size: 24rpx;
} }
.icon_search {
background-image: url('@/static/icon/map_ic_search.png');
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
width: 36upx;
height: 36upx;
margin-right: 20upx;
}
}
.searBtn {
width: 80rpx;
align-items: center;
font-size: 30rpx;
color: #fff;
}
} }
</style> </style>

View File

@@ -28,23 +28,23 @@
<view class="home_nar"> <view class="home_nar">
<view class="hn_cl_tit shuguan" @click="onPageJump('../clock/index')"> <view class="hn_cl_tit shuguan" @click="onPageJump('../clock/index')">
<image src="../../static/icon/home1.png" mode="aspectFit"></image> <image src="../../static/icon/home1.png" mode="aspectFit"></image>
<text>打卡</text> <text> </text>
</view> </view>
<view class="hn_cl_tit dianzishu" @click="onPageJump('../listen/home')"> <view class="hn_cl_tit dianzishu" @click="onPageJump('../listen/home')">
<image src="../../static/icon/home2.png" mode="aspectFit"></image> <image src="../../static/icon/home2.png" mode="aspectFit"></image>
<text>听书</text> <text> </text>
</view> </view>
<!-- <view class="hn_cl_tit" @click="onPageJump('../bookShop/bookShopIndex')"> --> <!-- <view class="hn_cl_tit" @click="onPageJump('../bookShop/bookShopIndex')"> -->
<view class="hn_cl_tit shuping" @click="onPageJump('../comments/commentsList')"> <view class="hn_cl_tit shuping" @click="onPageJump('../comments/commentsList')">
<image src="../../static/icon/home3.png" mode="aspectFit"></image> <image src="../../static/icon/home3.png" mode="aspectFit"></image>
<text>书评</text> <text> </text>
</view> </view>
<view class="hn_cl_tit chaoshi" @click="onPageJump('../talkBook/talkBook')"> <view class="hn_cl_tit chaoshi" @click="onPageJump('../talkBook/talkBook')">
<image src="../../static/icon/home4.png" mode="aspectFit"></image> <image src="../../static/icon/home4.png" mode="aspectFit"></image>
<text>讲书</text> <text> </text>
</view> </view>
</view> </view>
@@ -198,7 +198,8 @@
<view class="goods"> <view class="goods">
<!-- 精选 --> <!-- 精选 -->
<view class="" > <view class="" >
<view class="" v-if="tjProList.length > 0"> <view v-if="tjProList.length > 0" >
<view class="flexbox" style="flex-wrap: wrap;">
<view class="goodsItem" v-for="(item,index) in tjProList" :key="index" <view class="goodsItem" v-for="(item,index) in tjProList" :key="index"
@click="goDetail(item.shopproudicts[0].productId)"> @click="goDetail(item.shopproudicts[0].productId)">
<image :src="item.shopproudicts[0].productImages" mode="" class="goodsImg"></image> <image :src="item.shopproudicts[0].productImages" mode="" class="goodsImg"></image>
@@ -213,14 +214,16 @@
</view> </view>
</view> </view>
</view> </view>
<br clear="both"> </view>
<view v-if="status==0" style="text-align: center;"> <view class="">
<u-loading-icon style="display: inline-block;"></u-loading-icon> <view v-if="status==0" style="text-align: center;">
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font> <u-loading-icon style="display: inline-block;"></u-loading-icon>
</view> <font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
<view v-if="status==1"> </view>
<u-divider text="全部加载完成"></u-divider> <view v-if="status==1">
</view> <u-divider text="全部加载完成"></u-divider>
</view>
</view>
</view> </view>
<u-divider v-else text="暂无数据哦~"></u-divider> <u-divider v-else text="暂无数据哦~"></u-divider>
@@ -301,6 +304,10 @@
uni.hideTabBar(); uni.hideTabBar();
// this.requestIapOrder() // this.requestIapOrder()
}, },
onHide() {
this.page = 1
this.tjProList = []
},
//页面显示 //页面显示
onShow() { onShow() {
// 隐藏原生的tabbar // 隐藏原生的tabbar
@@ -692,7 +699,9 @@
.price{color: #9b9b9b !important; font-size: inherit; font-weight: normal !important; display: block;} .price{color: #9b9b9b !important; font-size: inherit; font-weight: normal !important; display: block;}
} }
.ProTabs{margin: 20rpx 0; padding:0 20rpx; .ProTabs{margin: 20rpx 0; padding:0 20rpx;
text{padding: 4rpx 8rpx; font-size: 32rpx; border-radius: 10rpx; overflow: hidden; background-color: #eee; color: #55aa7f; margin-right: 10rpx;} text{padding: 12rpx 14rpx; font-size: 32rpx; border-radius: 10rpx; overflow: hidden;
// background-color: #eee;
color: #55aa7f; margin-right: 10rpx;}
text.cur{background-color:#55aa7f ; color: #fff;} text.cur{background-color:#55aa7f ; color: #fff;}
} }
.newBook{margin-top: 20rpx;} .newBook{margin-top: 20rpx;}
@@ -812,8 +821,8 @@
align-content: center; align-content: center;
justify-content: center; justify-content: center;
image { image {
width: 110upx; width:90%;
height:110upx; height:156rpx;
display: block; display: block;
margin: 0 auto; margin: 0 auto;
// margin: 0 20rpx; // margin: 0 20rpx;
@@ -1104,7 +1113,7 @@
.goodsName { .goodsName {
margin-top: 10rpx; margin-top: 10rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: bold; // font-weight: bold;
} }
.goodsPrice { .goodsPrice {
@@ -1113,7 +1122,7 @@
display: flex; justify-content: space-between; display: flex; justify-content: space-between;
.price{ .price{
font-weight: bold; font-weight: bold;
color: #bf0c0c; color: #ff0000;
} }
.Salesnum{color: #9b9b9b;} .Salesnum{color: #9b9b9b;}
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB