2023.09.01

This commit is contained in:
@fawn-nine
2023-09-01 18:04:41 +08:00
parent ef6c52c0d4
commit 7b9044f4df
13 changed files with 1135 additions and 260 deletions

View File

@@ -137,7 +137,7 @@
this.$http
.post('book/shopcategory/getOneLevel')
.then(res => {
console.log(res,'一级分类')
//console.log(res,'一级分类')
this.oneLevel = res.list
// this.current = e.type
this.getTowLevel(this.oneLevel[0])
@@ -151,7 +151,7 @@
this.$http
.post(`book/shopcategory/getTwoLevel?catId=${e.catId}`)
.then(res => {
console.log(res,'二级分类')
//console.log(res,'二级分类')
this.towLevel = res.list
if (this.towLevel == '') {
this.commodityList = []
@@ -182,7 +182,7 @@
'catId': e.catId
})
.then(res => {
console.log(res,'二级分类')
// console.log(res,'二级分类')
this.commodityList = res.list
})
},

View File

@@ -27,12 +27,12 @@
</view>
<!-- 详情 + 评价1 -->
<view v-if="contentShow == 0">
<!-- <view class="tingshuList">
<h4>赠送内容</h4>
<view class="item flexbox">
<text>中医免疫学</text><u-icon name="volume" color="#71d5a1" size="24">立即试听</u-icon>
<view class="tingshuList" v-if="listenList.length > 0">
<h4>赠送听书权益</h4>
<view class="item flexbox" v-for="item in listenList" :key="item.id" @click="goToListen(item.id)">
<text>{{item.name}}</text><u-icon name="volume" color="#71d5a1" size="24">立即试听</u-icon>
</view>
</view> -->
</view>
<view class="bookInfo" >
<u-row customStyle="margin-bottom: 10px">
<u-col ><span>书名{{productInfo.productName}}</span></u-col>
@@ -156,6 +156,7 @@
cartList: [], // 购物车列表
commentsList:[], // 评论列表
productId:null, // 商品评论
listenList:[] // 关联得听书
}
},
onLoad(e) {
@@ -171,6 +172,12 @@
musicPlay
},
methods: {
goToListen(id){
// 跳转到听书
uni.navigateTo({
url: "../listen/listen?bookid="+ id
});
},
// 放大图片
previewImage(url){
console.log(url)
@@ -246,10 +253,12 @@
console.log(e.id,'e.id')
this.$http
.post('/book/shopproduct/info/' + e.id)
.then(res => {
.then(res => {
console.log('shopproduct',res)
this.productInfo = res.shopProduct
this.listenList = res.shopProduct.bookidsimages
if (this.productInfo.productImageList == null || this.productInfo.productImageList == '') {
this.swiperlist.push('../../static/icon/home_ban_1.jpg')
this.swiperlist.push(this.productInfo.productImages)
} else {
let imgList = this.productInfo.productImageList.split(",")
// if(this.productInfo.productDetails != null){
@@ -454,7 +463,12 @@ formatRichText (html) { //控制小程序中图片大小
}
</script>
<style lang="scss" scoped>
.tingshuList{margin-top: 20rpx;
.tingshuList{margin-top: 20rpx; background-color: #fff; padding: 20rpx;
border-radius: 20rpx; margin-bottom: 20rpx; padding-top: 40rpx;
background-image: linear-gradient(0deg, #f7fffc 0%, #def0ea 100%);
.item{margin-bottom: 20rpx;}
h4{color: #5fb386; font-size: 40rpx; margin-bottom: 20rpx;}
text{color: #444; font-size: 32rpx; padding-left: 20rpx;}
}
.pjimgs{ margin: 10px 0;flex-wrap: wrap; display: flex; justify-content: space-between;
.item{width: 23%; margin-right: 10px;

View File

@@ -405,7 +405,7 @@
'orderSn': this.orderSn,
'bookid': this.productID,
// 'content': this.Pform.html,
'content': this.Pform.comment,
'content': this.Pform.comment,
'starLevel':this.Pform.star,
'images':this.Pform.img,
// 'emoji':this.emoji // 表情数组