真食物配套的电商小程序.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.4 KiB

<template>
<view class="evaluateWtapper" v-if="reply&&reply.length>0">
<view v-for="(item, evaluateWtapperIndex) in reply" :key="evaluateWtapperIndex">
<view class="evaluateItem" v-if="item">
<view class="pic-text acea-row row-middle">
<view class="pictrue">
<image v-if="item.avatar" :src="item.avatar" class="image" />
<view class="noAvatar acea-row row-middle row-center" v-else>
<image src="@/static/images/yanjie-logo.png" mode="widthFix"></image>
</view>
</view>
2 years ago
<view class="">
<!-- <view class="acea-row row-middle"> -->
<view class="name line1">{{ item.nickname || '微信用户' }}</view>
2 years ago
<!-- <view class="start" :class="'star' + item.star"></view> -->
<view class="starBox acea-row">
<image src="@/static/images/min-star-light.png" v-for="(item, index) in stars[evaluateWtapperIndex]" :key="index"></image>
<image src="@/static/images/star-border-light.png" v-for="(item, index) in 5-stars[evaluateWtapperIndex]" :key="index"></image>
<!-- <image src="@/static/images/min-star.png" v-for="(item, index) in 5-stars[evaluateWtapperIndex]" :key="index"></image> -->
2 years ago
</view>
</view>
</view>
2 years ago
<!-- <view class="time">{{ item.createTime }} {{ item.sku||'' }}</view> -->
<view class="evaluate-infor">{{ item.comment }}</view>
2 years ago
<view class="imgList acea-row" v-if="item.picturesArr.length">
<view class="pictrue" v-for="(itemn, eq) in item.picturesArr" :key="eq">
<image :src="itemn" class="image" />
</view>
</view>
2 years ago
<!-- <view class="reply" v-if="item.merchantReplyContent">
2 years ago
<span class="font-color-red">电商店员</span>
{{item.merchantReplyContent}}
2 years ago
</view> -->
</view>
</view>
</view>
</template>
<script>
import {
dataFormat
} from "@/utils";
export default {
name: "UserEvaluation",
props: {
reply: {
type: Array,
default: () => []
}
},
data: function () {
2 years ago
return {
stars: []
};
},
mounted: function () {
2 years ago
this.stars = this.reply.map( val => {
return val.star*1;
})
},
methods: {
dataFormat
}
};
</script>
2 years ago
<style lang="less" scoped>
.starBox {
padding-top: 4rpx;
image {
width: 26rpx;
height: 26rpx;
}
}
</style>