|
|
@ -2,32 +2,52 @@
|
|
|
|
* @Author: ch
|
|
|
|
* @Author: ch
|
|
|
|
* @Date: 2022-06-22 15:15:22
|
|
|
|
* @Date: 2022-06-22 15:15:22
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditors: ch
|
|
|
|
* @LastEditTime: 2022-06-23 14:23:27
|
|
|
|
* @LastEditTime: 2022-06-23 18:29:57
|
|
|
|
* @Description: file content
|
|
|
|
* @Description: file content
|
|
|
|
-->
|
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<view class="preview">
|
|
|
|
<view class="preview">
|
|
|
|
<view class="preview--top">
|
|
|
|
<view class="preview--top">
|
|
|
|
{{current + 1}}/{{imgs.length}}
|
|
|
|
<image class="preview--back" src="@/static/common/back_white.png" @click="$Router.back()"></image>
|
|
|
|
|
|
|
|
<view class="preview--title">{{current + 1}}/{{imgs.length}}</view>
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<u-swiper :list="imgs" :current="current" @change="handleChange" :autoplay="false" />
|
|
|
|
<u-swiper height="calc(100vh - 420rpx)" :list="imgs" :current="current"
|
|
|
|
|
|
|
|
@change="handleChange" :autoplay="false" imgMode="aspectFit" radius="0"/>
|
|
|
|
<view class="preview--footer">
|
|
|
|
<view class="preview--footer">
|
|
|
|
<BsCommentUserInfo :userData="data"/>
|
|
|
|
<view class="preview--user">
|
|
|
|
|
|
|
|
<image class="preview--avatar" :src="data.userAvatar"></image>
|
|
|
|
<view>
|
|
|
|
<view>
|
|
|
|
<view class="top">
|
|
|
|
<view>{{data.userName}}</view>
|
|
|
|
|
|
|
|
<view>已购买{{data.skuName}}</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view>
|
|
|
|
|
|
|
|
<view class="preview--rate">
|
|
|
|
<u-rate count="5" size="30rpx" :value="data.commentScore" activeColor="#FFA35B" readonly inactiveColor="#DDD"></u-rate>
|
|
|
|
<u-rate count="5" size="30rpx" :value="data.commentScore" activeColor="#FFA35B" readonly inactiveColor="#DDD"></u-rate>
|
|
|
|
<text class="top--time">{{ data.createTime }}</text>
|
|
|
|
<text class="preview--time">{{ data.createTime }}</text>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="preview--ctx">{{ data.commentContent }}</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="thumb">
|
|
|
|
|
|
|
|
<view class="thumb--item">
|
|
|
|
|
|
|
|
<u-icon color="#fff" name="thumb-up"></u-icon>
|
|
|
|
|
|
|
|
<text>2</text>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="thumb--item" @click="$Router.push(`/goodsCommentDetail?id=${data.id}`)">
|
|
|
|
|
|
|
|
<u-icon color="#fff" name="chat"></u-icon>
|
|
|
|
|
|
|
|
<text>{{answerCount}}</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="ctx">{{ data.commentContent }}</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import BsCommentUserInfo from '@/components/BsCommentUserInfo.vue';
|
|
|
|
import BsCommentUserInfo from '@/components/BsCommentUserInfo.vue';
|
|
|
|
|
|
|
|
import BsCommentThumbup from '../../../components/BsCommentThumbup.vue';
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: { BsCommentUserInfo },
|
|
|
|
components: { BsCommentUserInfo,BsCommentThumbup },
|
|
|
|
data (){
|
|
|
|
data (){
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
data : this.$store.state.comment_preview,
|
|
|
|
data : this.$store.state.comment_preview,
|
|
|
@ -38,6 +58,10 @@ export default {
|
|
|
|
imgs(){
|
|
|
|
imgs(){
|
|
|
|
const arr = this.data.pictureUrl || [];
|
|
|
|
const arr = this.data.pictureUrl || [];
|
|
|
|
return arr.split(',')
|
|
|
|
return arr.split(',')
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
answerCount (){
|
|
|
|
|
|
|
|
const arr = this.data.answerCommentList || []
|
|
|
|
|
|
|
|
return arr.length;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onShow(){
|
|
|
|
onShow(){
|
|
|
@ -61,7 +85,6 @@ page{
|
|
|
|
|
|
|
|
|
|
|
|
.preview{
|
|
|
|
.preview{
|
|
|
|
&--top{
|
|
|
|
&--top{
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
height: 44px;
|
|
|
|
height: 44px;
|
|
|
|
padding: 0 20px;
|
|
|
|
padding: 0 20px;
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
@ -72,5 +95,68 @@ page{
|
|
|
|
top: var(--window-top);
|
|
|
|
top: var(--window-top);
|
|
|
|
z-index: 999;
|
|
|
|
z-index: 999;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&--back{
|
|
|
|
|
|
|
|
width: 14rpx;
|
|
|
|
|
|
|
|
height: 28rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
&--title{
|
|
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
&--footer{
|
|
|
|
|
|
|
|
padding: 40rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
&--user{
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
view{
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
&--avatar{
|
|
|
|
|
|
|
|
width: 70rpx;
|
|
|
|
|
|
|
|
height: 70rpx;
|
|
|
|
|
|
|
|
background: #ccc;
|
|
|
|
|
|
|
|
margin-right: 20rpx;
|
|
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
&--rate{
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
margin: 20rpx 0 ;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
&--time{
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
&--ctx{
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
@include ellipses(2);
|
|
|
|
|
|
|
|
line-height: 32rpx;
|
|
|
|
|
|
|
|
height: 60rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.thumb{
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
|
|
margin-top: 20rpx;
|
|
|
|
|
|
|
|
&--item{
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
margin-left: 50rpx;
|
|
|
|
|
|
|
|
text{
|
|
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
|
|
margin-left: 10rpx;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
&--icon{
|
|
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
|
|
margin-left: 10rpx;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|