修改预览页面

feature/comment-0620-ch
ch 2 years ago
parent 8891cc6734
commit 90e514436b

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 15:09:06
* @LastEditors: ch
* @LastEditTime: 2022-06-12 13:46:04
* @LastEditTime: 2022-06-23 17:45:29
* @Description: file content
-->
<template>
@ -28,6 +28,7 @@ export default {
return this.$store.state.userInfo
}
},
methods:{
logout(){
uni.showModal({

@ -2,32 +2,52 @@
* @Author: ch
* @Date: 2022-06-22 15:15:22
* @LastEditors: ch
* @LastEditTime: 2022-06-23 14:23:27
* @LastEditTime: 2022-06-23 18:29:57
* @Description: file content
-->
<template>
<view class="preview">
<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>
<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">
<BsCommentUserInfo :userData="data"/>
<view class="preview--user">
<image class="preview--avatar" :src="data.userAvatar"></image>
<view>
<view>{{data.userName}}</view>
<view>已购买{{data.skuName}}</view>
</view>
</view>
<view>
<view class="top">
<view class="preview--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 class="ctx">{{ data.commentContent }}</view>
</view>
</view>
</view>
</template>
<script>
import BsCommentUserInfo from '@/components/BsCommentUserInfo.vue';
import BsCommentThumbup from '../../../components/BsCommentThumbup.vue';
export default {
components: { BsCommentUserInfo },
components: { BsCommentUserInfo,BsCommentThumbup },
data (){
return {
data : this.$store.state.comment_preview,
@ -38,6 +58,10 @@ export default {
imgs(){
const arr = this.data.pictureUrl || [];
return arr.split(',')
},
answerCount (){
const arr = this.data.answerCommentList || []
return arr.length;
}
},
onShow(){
@ -61,7 +85,6 @@ page{
.preview{
&--top{
color: #fff;
height: 44px;
padding: 0 20px;
display: flex;
@ -72,5 +95,68 @@ page{
top: var(--window-top);
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>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-20 14:55:54
* @LastEditors: ch
* @LastEditTime: 2022-06-23 17:11:51
* @LastEditTime: 2022-06-23 17:13:29
* @Description: file content
-->
<template>
@ -10,7 +10,6 @@
<view class="box" v-for="(item, idx) in list" :key="item.productId">
<!-- {{item.isEdit}} -->
<BsCommentGoodsInfo :goods="item" />
<!-- <SubmitComment v-if="!item.id" :commentDetail="item" @submit="submitComment($event,idx)"/> -->
<BsCommentSubmit v-if="!item.id" :commentDetail="item" :type="COMMENT.TYPE.COMMENT"
@submit="submitComment($event,idx)" @editChang="editChange($event, idx)"/>

Loading…
Cancel
Save