123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <template>
- <view class="appraise-card">
- <view class="appraise-title">
- <view class="title">评价</view>
- <view class="comments">
- <view class="a-star">
- <zzx-icon name="star" size="10"></zzx-icon>
- <text>{{ listData.averageScore }}</text>
- </view>
- <view class="a-text">| {{ listData.scoreNum }}人评论</view>
- </view>
- </view>
- <view class="appraise-info" v-for="item in listData.records" :key="item.id" @click="check_detail">
- <view class="a-user-info">
- <view class="info">
- <image :src="item.avatar" mode=""></image>
- <view class="name">{{ item.username }}</view>
- </view>
- <view class="time">{{ DateUtils.formatDateToMMDD(item.createTime) }}</view>
- </view>
- <view class="a-score">
- <text>{{ item.score.toFixed(1) }}</text>
- <uni-rate :readonly="true" size="16" :value="item.score" />
- </view>
- <view class="a-content">
- {{ item.evaluateContent }}
- </view>
- <scroll-view class="scroll-view_H" scroll-x="true" :show-scrollbar="false">
- <view class="scroll-view-item_H uni-bg-red" v-for="(img, idx) in item.images.split(',')" :key="idx">
- <image @click="_previewImage(item.images.split(','), img)" :src="img" mode=""></image>
- </view>
- </scroll-view>
- </view>
- <view class="not-data" v-if="!listData.records.length">暂无评价数据</view>
- </view>
- </template>
- <script lang="ts" setup>
- import { _previewImage } from '@/utils/util';
- interface Props {
- listData?: any;
- }
- const props = withDefaults(defineProps<Props>(), {
- listData: [],
- });
- const check_detail = () => {
- uni.navigateTo({
- url: '/pages/index/commentsDetail/index'
- })
- }
- </script>
- <style lang="less" scoped>
- .appraise-card {
- padding: 20rpx;
- background: #FFFFFF;
- border-radius: 32rpx;
- margin-top: 20rpx;
- .appraise-title {
- display: flex;
- align-items: center;
- justify-content: space-between;
- .title {
- font-weight: 800;
- font-size: 32rpx;
- color: #222222;
- }
- .comments {
- display: flex;
- align-items: center;
- gap: 16rpx;
- .a-star {
- font-size: 24rpx;
- color: #FDD143;
- }
- .a-text {
- font-size: 24rpx;
- color: #AAAAAA;
- }
- }
- }
- .appraise-info {
- margin-top: 20rpx;
- .a-user-info {
- display: flex;
- align-items: center;
- justify-content: space-between;
- .info {
- display: flex;
- align-items: center;
- gap: 20rpx;
- &>image {
- width: 60rpx;
- height: 60rpx;
- border-radius: 50%;
- }
- .name {
- font-weight: bold;
- font-size: 24rpx;
- color: #222222;
- }
- }
- .time {
- font-size: 24rpx;
- color: #AAAAAA;
- }
- }
- .a-score {
- font-size: 24rpx;
- color: #AAAAAA;
- display: flex;
- align-items: center;
- gap: 20rpx;
- margin-top: 20rpx;
- }
- .a-content {
- margin-top: 20rpx;
- font-size: 28rpx;
- color: #222222;
- }
- .scroll-view_H {
- white-space: nowrap;
- width: 100%;
- height: 220rpx;
- margin-top: 20rpx;
- border-bottom: 1rpx solid #F0F0F0;
- .scroll-view-item_H {
- display: inline-block;
- text-align: center;
- margin-right: 14rpx;
- &>image {
- width: 202rpx;
- height: 200rpx;
- background: #D8D8D8;
- border-radius: 32rpx;
- }
- }
- }
- }
- }
- </style>
|