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