<template>
	<view>
		<view class="p-3 flex flex-row rounded-lg bg-white mt-2" v-for="(item,index) in resdata" :key="index" @click="toShow(item)" style="gap: 20rpx">
			<view class="flex-0" v-if="item.imgs.length > 0" style="flex-basis: 180rpx;">
				<image :src="item.imgs[0]" style="width:180rpx;height: 180rpx; border-radius: 16rpx;" mode="aspectFill"></image>
			</view>
			<view class="flex-5 flex flex-column justify-between" style="height: 180rpx;">
				<view>
					<text class="font32 line15 text-ellipsis-2">{{item.content}}</text>
					<text v-if="item.status === 0" style="background-color: #FFBE0E; border-radius: 18rpx; padding: 0 12rpx; font-size: 18rpx;">未处理</text>
					<text v-else-if="item.status === 1" style="background-color: #4A8DFF; border-radius: 18rpx; padding: 0 12rpx; font-size: 18rpx;">已处理</text>
				</view>
				<view class="flex align-center justify-start">
					<view class="flex align-start">
						<image src="../../static/images/icon-time.png" style="height: 20rpx; width: 20rpx;"></image>
						<text class="font24 text-muted">{{item.create_at}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"i-user-share-list",
		props:{
			resdata:{
				type:Array,
				default() {
				  return [];
				},
			}
		},
		data() {
			return {
				
			};
		},
		created() {
			console.log(this.resdata)
		},
		methods:{
			toShow(item){
				uni.navigateTo({
					url:'/pages/user-share/detail?id='+item.id,
				})
			}
		}
	}
</script>

<style>

</style>