<template>
	<view>
		<view  v-for="(item,index) in assesslist" :key="index" class="uni-padding-wrap" style="border-bottom: 1px solid #EEEEEE;padding-bottom: 10upx;">
			<view class="uni-comment">
				<view class="uni-comment-list">
					<view class="uni-comment-face"><image :src="item.member_avatar"></image></view>
					<view class="uni-comment-body">
						<view class="uni-comment-top">
							<text style="font-size: 28upx;color: #303133">{{item.member_truename}}</text>
						    <uniIcon type="star" size="16"></uniIcon>
						</view>
						<view class="uni-comment-date">
							<text style="color: #909399;font-size: 20upx;">{{item.geval_addtime}}</text>
						</view>
					</view>
					<view>
						<van-rate
						  :value="item.satisfaction"
						  void-icon="star"
						  void-color="#eee"
						  color="#ee0a24"
						  readonly='true'
						/>
					</view>
				</view>
				<view style="color: #303133;font-size: 28upx;" class="uni-comment-content">{{item.geval_content}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import assess from '@/component/assess.vue'  // 评价列表
	export default{
		components: {
			assess
		},
		data(){
			return {
				goodId: 0,
				assesslist:[],
				store_id: 0
			}
		},
		onLoad(options) {
			this.goodId = options.goodId;  // 商品Id
			this.store_id =  options.store_id;
			this.getassess();
		},
		methods: {
			getassess() {
				this.request({
					url: '/api/index.php?do=getevaluategoods',
					method: 'post',
					data: {
						goodsid: this.goodId
					},
					success: (res) => {
						this.assesslist = res.data;
					}
				})
			}
		}
	}
</script>

<style>
</style>
