讲书添加评论

This commit is contained in:
@fawn-nine
2023-12-06 16:23:33 +08:00
parent 5949070bc0
commit 916c175fe8

View File

@@ -26,6 +26,13 @@
</view>
</view>
</view>
<view class="imagesBox flexbox" v-if="swiperImages.length > 0" style="overflow: hidden;">
<!-- swiperImages -->
<view class="item" v-for="(item, index) in swiperImages" :key="index">
<image @click="previewImage(item)" :src="item" mode="aspectFit"></image>
</view>
</view>
<view class="content" v-if="talkBookDetail.content != ''" v-html="talkBookDetail.content"></view>
<view class="content" v-else></view>
<!-- <view class="time">
@@ -207,6 +214,7 @@
pPage: 1,
pTotal: 0, // 评论的总条数
plList: [], // 书评的评论list
swiperImages: []
}
},
onLoad(e) {
@@ -238,6 +246,19 @@
},
methods: {
...mapMutations(['setUserInfo']),
// 放大图片
previewImage(url) {
console.log(url)
uni.previewImage({
urls: [url],
longPressActions: {
itemList: ['很抱歉,暂不支持保存图片到本地'],
success: function(res) {
// console.log(res,'+++++')
}
}
});
},
start() {
this.initAudio() // 开始播放
},
@@ -350,6 +371,10 @@
if (res.code == 0) {
console.log(res, 'res')
this.talkBookDetail = res.bookTeach
if (res.bookTeach.images != "") {
// this.bookTeach = []
this.swiperImages = res.bookTeach.images.split(';')
}
this.audio.src = this.talkBookDetail.voices // 设置播放资源路径
this.audio.onCanplay((e) => {
@@ -659,6 +684,19 @@
</script>
<style scoped lang="scss">
.imagesBox {
justify-content: center;
.item {
width: 30%;
padding: 0 10rpx;
image {
width: 100%;
}
}
}
.mainContent {
margin: 20rpx 10rpx;
padding: 20rpx;
@@ -829,12 +867,12 @@
border-bottom: 1px solid #f0f0f0;
.condelt {
color: #fd6004;
margin-right: 20rpx;
color: #fd6004;
margin-right: 20rpx;
}
.conhuif {
color: #4185c1;
}