<template>
	<view>
		<view  v-for="(item,index) in feedback_list" :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  style="width: 100%;height: 100%;" :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.add_time}}</text>
						</view>
					</view>
					<view>
						<van-rate
						  size="16"
						  :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.content}}</view>
				<view  class="flex-box flex-v-ce">
					<image v-for="(items, indexs) in item.img_list" :key="indexs"  @click="gopicture(item.img_list)" :src="items" class="imgs"></image>
				</view>
			</view>
		</view>
		 <unipopup :images="images"  :show="ishow"/>
	</view>
</template>

<script>
	import unipopup from '@/component/openpictrue.vue'
	import uniIcon from '@/component/uni-icon/uni-icon.vue'
	export default {
		components: {
			unipopup
		},
		props: {
			feedback_list: {
				type: Array
			},
			showpicture: {
				type: Boolean,
				default: false,
			}
		},
		
		component:{
			uniIcon
		},
		watch: {
		'showpicture': function(val){
			if(val) {
				this.ishow = true;
			}else {
				this.ishow = false;
			}
		}
		},
		data() {
			return {
				images: '',
				ishow: false,
				//title:"评论界面"
			}
		},
		methods: {
			gopicture(e) {
				console.log(e);
				uni.previewImage({
					urls: e,
					longPressActions: {
						itemList: ['发送给朋友', '保存图片', '收藏'],
						success: function(data) {
							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
						},
						fail: function(err) {
							console.log(err.errMsg);
						}
					}
				});
				// this.images = e;
				// this.ishow = true;
				// uni.$emit('changpicture')
			}
			
		},
	}
</script>

<style>
	.imgs{
		width: 100upx;
		height: 100upx;
		margin-right: 10upx;
	}
</style>
