页面布局修改 订单修改

This commit is contained in:
@fawn-nine
2023-09-28 16:58:16 +08:00
parent c785f36086
commit 6031018523
5 changed files with 166 additions and 43 deletions

View File

@@ -3,7 +3,8 @@
<z-nav-bar title="书籍详情"></z-nav-bar>
<view class="book_neir flexbox">
<view class="bn_img">
<img :src="bookMessage.images" mode="scaleToFill">
<img :src="bookMessage.images" mode="scaleToFill">
</view>
<view class="bn_nes">
<view style="font-weight: bold;margin-bottom: 30rpx;">
@@ -19,10 +20,10 @@
</view>
<view class="tags">
<uni-tag class="tag" @click="toMore()" :inverted="true" text="书评" type="success"></uni-tag>
<uni-tag @click="gotoListen()" class="tag" v-if="bookMessage.canListen" :inverted="true" text="听书" type="primary"></uni-tag>
<uni-tag @click="gotoListen()" class="tag" v-if="bookMessage.canListen" :inverted="true" text="听书" type="primary"></uni-tag>
<!-- 1:打卡2不打卡 -->
<uni-tag @click="gotoclock()" v-if="bookMessage.clockIn == 1" class="tag" :inverted="true" text="签到" type="warning"></uni-tag>
<uni-tag @click="goJiangShu()" v-if="bookMessage.teachIn == 1" class="tag" :inverted="true" text="讲书" type="error"></uni-tag>
</view>
<view class="buy" v-if="!bookMessage.isBuy">
<view class="btn" @click="goBuy">
@@ -218,6 +219,12 @@
this.getComments()
},
// 去讲书
goJiangShu(){
uni.navigateTo({
url: '../talkBook/talkBookDetail?bookId='+ this.bookId
});
},
// 去听书
gotoListen(){
uni.navigateTo({

View File

@@ -28,7 +28,7 @@
<!-- <view class="contentButton">
<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 class="" style="padding: 20rpx;">
<view class="" style="padding:40rpx 20rpx;">
<view class="mytabs flexbox">
<view :class="['item','item1', contentShow == 1 ? 'active' :'']" @click="setData(1)">
已购图书
@@ -42,14 +42,70 @@
<view class="wrap" v-if="contentShow == 1">
<view class="" v-if="bookList.length > 0">
<u-row gutter="16" justify="flex-start">
<u-col span="4" v-for="(item,index) in bookList" :key="index">
<view class=" listenItem">
<view class="" @click="goDetail(item)">
<image v-if="item.images != '' && item.images != null" :src="item.images" mode="scaleToFill"></image>
<image v-else src="../../static/icon/wufeng.jpg" mode="scaleToFill"></image>
<u-col span="12" v-for="(item,index) in bookList" :key="index">
<view>
<view class="flexbox yigoumaiList">
<view class="info">
<view class="videoBox demo-layout bg-purple">
<image v-if="item.images != '' && item.images != null" :src="item.images"
mode="scaleToFill"></image>
<image v-else src="../../static/icon/wufeng.jpg" mode="scaleToFill"></image>
</view>
</view>
<view class="btns">
<view class="text">
<view class="bookName">{{item.name}}</view>
<view class="author">
作者<text v-if="item.authorName == null || item.authorName == ''">暂无</text>
<text v-else>{{item.authorName}}</text>
</view>
</view>
<view class="flexbox icons">
<view class="item " >
<!-- <u-icon name="chat" color="#fcbd71" size="24"></u-icon> -->
<view v-if="item.clockIn != null && item.clockIn != 2" @click="goDaKa(item)">
<image src="../../static/icon/home1.png" mode="aspectFit"></image>
</view>
<view v-else @click="noOp()">
<image class="gray" src="../../static/icon/home1.png" mode="aspectFit"></image>
</view>
<view class="v1"><text> </text></view>
</view>
<view class="item " >
<!-- <u-icon name="volume" color="#71d5a1" size="24"></u-icon> -->
<view v-if="item.canListen" @click="goToListenFree(item)">
<image src="../../static/icon/home2.png" mode="aspectFit"></image>
</view>
<view v-else @click="noOp()">
<image class="gray" src="../../static/icon/home2.png" mode="aspectFit"></image>
</view>
<view class="v1"><text> </text></view>
</view>
<view class="item " @click="goPingshu(item)">
<!-- <u-icon name="chat" color="#fcbd71" size="24"></u-icon> -->
<view class="">
<image src="../../static/icon/home3.png" mode="aspectFit"></image>
</view>
<view class="v1"><text> </text></view>
</view>
<view class="item " >
<!-- <u-icon name="chat" color="#fcbd71" size="24"></u-icon> -->
<view class="" v-if="item.teachIn != null && item.teachIn != 0" @click="goJiangShu(item)">
<image src="../../static/icon/home4.png" mode="aspectFit"></image>
</view>
<view class="" v-else @click="noOp()">
<image class="gray" src="../../static/icon/home4.png" mode="aspectFit"></image>
</view>
<view class="v1">
<text> </text>
</view>
</view>
</view>
</view>
<view class="bookName">{{item.name}}</view>
</view>
</view>
</u-col>
</u-row>
<view>
@@ -71,7 +127,8 @@
<u-col span="4" v-for="(item,index) in tjBookLIst" :key="index">
<view class=" listenItem">
<view class="" @click="goDetail(item)">
<image v-if="item.images != '' && item.images != null" :src="item.images" mode="scaleToFill"></image>
<image v-if="item.images != '' && item.images != null" :src="item.images"
mode="scaleToFill"></image>
<image v-else src="../../static/icon/wufeng.jpg" mode="scaleToFill"></image>
</view>
<view class="bookName"><text>{{item.name}}</text></view>
@@ -163,7 +220,7 @@
// this.loadingNow = true
console.log('到底了')
if (this.contentShow == 1) {
if (this.page+1 <= this.totalPage) {
if (this.page + 1 <= this.totalPage) {
this.page++
this.status = 0
this.getfreeBook()
@@ -206,7 +263,7 @@
goPingshu(val) {
console.log('评书', val)
uni.navigateTo({
url: '../comments/comments?bookid=' + val,
url: '../comments/comments?bookid=' + val.id,
});
},
contentButtonClick(e) {
@@ -228,12 +285,12 @@
if (res.page.records.length > 0) {
this.bookList = this.bookList.concat(res.page.records)
this.totalPage = res.page.pages
if(this.page == this.totalPage){
if (this.page == this.totalPage) {
this.status = 1
}else{
} else {
this.status = 3
}
} else {
this.bookList = []
}
@@ -269,7 +326,12 @@
});
},
noOp(){
uni.showToast({
title:'该书未开通此功能',
icon:'none'
})
},
// 跳转详情页
goDetail(item) {
console.log(item, 'goDetail-----')
@@ -285,11 +347,23 @@
});
},
// 跳转到讲书
goJiangShu(val){
uni.navigateTo({
url: '../talkBook/talkBookDetail?bookId='+ val.id
})
},
// 跳转到打卡
goDaKa(val){
uni.navigateTo({
url: '../clock/clock?bookid='+ val.id
})
},
// 跳转到听书详情
goToListenFree(item) {
// console.log(item,'item')
uni.navigateTo({
url: "../listen/listen?bookid=" + item.bookId + "&fengImg=" + item.image // 前台播放版本
url: "../listen/listen?bookid=" + item.id // 前台播放版本
});
},
// 跳转11
@@ -304,7 +378,33 @@
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.gray {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
}
.yigoumaiList{ background-color: #fff;
.btns{ margin-left: 20rpx; width: calc(100% - 200rpx); box-sizing: border-box; font-size: 34rpx; justify-content: space-between;
.item{ margin-bottom:30rpx; width: 20%; text-align: center;
image{
display: block; margin-right: 10rpx; height: 112rpx;
}
.v1{margin-top: -30rpx;}
}
}
.author{
font-size: 28rpx; color: #999;
}
.info{width:200rpx;
image{width:100% ; height: 280rpx; border-radius: 20rpx;}
}
.icons{ margin-top: 10rpx;
text{font-size: 26rpx; margin-top: -10rpx; color: #999;}
}
}
.hehan {
width: 50%;
margin: 0 auto;
@@ -317,13 +417,13 @@
.mytabs {
// background: url('@/static/icon/bgtushu.png') no-repeat left top;
height: 80rpx;
margin-bottom: 30rpx;
// margin-bottom: 30rpx;
.item {
border-radius: 10rpx;
background-color: #c6ead0;
width: 48%;
margin: 0 10rpx;
// margin: 0 10rpx;
text-align: center;
color: #3c7f56;
font-size: 36rpx;
@@ -336,7 +436,7 @@
}
.item1 {
// background-color: #adb6b7;
margin-right: 20rpx;
}
}
@@ -407,7 +507,7 @@
}
.listenList {
padding: 10rpx;
padding:0 20rpx;
box-sizing: border-box;
width: calc(100% - 10rpx);
}
@@ -475,7 +575,7 @@
background-size: cover;
padding: 20rpx;
position: relative;
margin-bottom: 30rpx;
// margin-bottom: 30rpx;
// height: 400rpx; margin-bottom: 130rpx;
.icon_hua_1 {
@@ -511,9 +611,9 @@
margin-bottom: 20rpx;
.search {
height: 56upx;
height: 56upx;
display: flex;
width: 100%;
width: 86%; margin: 0 auto;
align-items: center;
padding: 0upx 40upx;
background-color: #fff;

View File

@@ -69,7 +69,7 @@
</view>
</view>
<u-divider v-else text="暂无书籍数据~"></u-divider>
<u-divider v-else text="暂无书籍数据~"></u-divider>
<music-play :playData="playData"></music-play>
<!-- <z-navigation></z-navigation> -->
</view>

View File

@@ -8,14 +8,16 @@
<!-- 基本信息 -->
<view class="book_neir">
<view class="flexbox info">
<view class="item">
<image class="bn_img" v-if="bookInfo.images != ''" :src="bookInfo.images"
mode="widthFix"></image>
<image class="bn_img" style="border:1px solid #eee" v-else src="../../static/icon/wufeng.jpg"
mode="widthFix"></image>
<view class="item" style="width: 200rpx;">
<view class="">
<image class="bn_img" v-if="bookInfo.images != ''" :src="bookInfo.images"
mode="widthFix"></image>
<image class="bn_img" style="border:1px solid #eee" v-else src="../../static/icon/wufeng.jpg"
mode="widthFix"></image>
</view>
</view>
<!-- <img :src="bookInfo.images" class="bn_img"> -->
<view class="item">
<view class="item" style="width: calc(100% - 200rpx);">
<!-- <b class="leiXing" v-if="bookInfo.isVip==1" style="background: #c79119;">VIP</b>
<b class="leiXing" v-if="bookInfo.isVip==2" style="background: #c74119;">付费</b> -->
<view class="bn_nes">
@@ -26,14 +28,16 @@
<p @click="onAuCHJump(bookInfo.author.id,1)" style="margin-bottom: 20rpx;">
{{bookInfo.author.authorName}} [] >
</p>
<p @click="onAuCHJump(item.id,2)" v-for="item in this.bookInfo.publisherNIList">
<p @click="onAuCHJump(item.id,2)" v-for="item in bookInfo.publisherNIList">
{{item.title}} >
</p>
</view>
<view class="tags">
<uni-tag class="tag" @click="toMore()" :inverted="true" text="书评" type="success"></uni-tag>
<uni-tag @click="gotoListen()" class="tag" v-if="bookInfo.canListen" :inverted="true" text="听书" type="primary"></uni-tag>
<!-- 1:打卡2不打卡 -->
<uni-tag @click="gotoclock()" v-if="bookInfo.clockIn == 1" class="tag" :inverted="true" text="签到" type="warning"></uni-tag>
<uni-tag @click="gotoclock()" v-if="bookInfo.clockIn == 1" class="tag" :inverted="true" text="打卡" type="warning"></uni-tag>
<uni-tag @click="goJiangShu()" v-if="bookInfo.teachIn == 1" class="tag" :inverted="true" text="讲书" type="error"></uni-tag>
</view>
<!-- <view class="price">
<text class="light">98.00</text>
@@ -219,6 +223,18 @@
url: '../comments/comments?bookid='+ this.bookid,
});
},
// 去听书
gotoListen(){
uni.navigateTo({
url: "../listen/listen?bookid=" + this.bookid
});
},
// 去讲书
goJiangShu(){
uni.navigateTo({
url: '../talkBook/talkBookDetail?bookId='+ this.bookid
});
},
// 去打卡
gotoclock(){
uni.navigateTo({
@@ -584,7 +600,7 @@
}
.flexbox{display: flex;}
.book_neir{ margin-top: 80rpx; padding: 20rpx;
.bn_img{width:300rpx !important;}
.bn_img{width:100%}
}
.info{overflow: hidden;width: 100%;}
.book_neir {
@@ -592,11 +608,11 @@
position: relative;
.item{display: inline-block; float: left; width: 50%; overflow: hidden;}
.bn_img {
float: left;
width: 250upx;
height: 320upx;
}
// .bn_img {
// float: left;
// width: 250upx;
// height: 320upx;
// }
.bn_nes {
float: left;
@@ -622,7 +638,7 @@
font-size: 16rpx;
}
}
.container{background-color: #fff; }
.container{background-color: #fff; padding-bottom: 20rpx; }
.playTitle{width: 80%; margin: 20rpx auto; margin-top: 50rpx;}
.libTitle{font-size:40rpx; margin:40rpx 0; display: block; text-align: center;}
.tanchu{ padding: 40rpx 30rpx 40rpx 30rpx; }

View File

@@ -773,7 +773,7 @@
.search{height: 56upx;
display: flex;
width: 100%;
width: 86%; margin: 0 auto;
align-items: center;
padding: 0upx 40upx;
background-color: #fff;