<template>
	<mobile-frame>
		<view class="main">
			<view class="one">
				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
					<view class="list-scroll-view">
						<view class="list" v-for="(item, index) in list" :key="index" @click="toView(item)">
							<image class="image" :src="item.file" mode=""></image>
							<view class="other">
								<view class="name">{{item.name}}</view>
								<view class="other_1">
									关注人数 <text>{{item.num}}</text>
								</view>
								<view class="other_1">
									关注时间 <text>{{item.time}}</text>
								</view>
							</view>
							<view class="btn">
								<text @click="toDel(item)" class="iconfont icon-del"></text>
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
		</view>
	</mobile-frame>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						file: require('@/static/test.png'),
						name: '官方自营店',
						num: 2,
						time: '2022-09-27'
					},
					{
						file: require('@/static/test.png'),
						name: '官方自营店',
						num: 2,
						time: '2022-09-27'
					},
					{
						file: require('@/static/test.png'),
						name: '官方自营店',
						num: 2,
						time: '2022-09-27'
					}
				]
			};
		},
		onShow: function() {

		},
		methods: {
			// 详细信息
			toView(e) {
				const that = this;
				console.log(e);
			},
			// 删除
			toDel(e) {
				const that = this;
				console.log(e);
			},
			// 分页
			toPage(e) {
			
			},
		}
	}
</script>

<style lang="scss">
	.main {
		display: flex;
		flex-direction: column;
		width: 100vw;
		height: 100vh;

		.one {
			padding: 2vw 0 0 0;

			.list {
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				width: 95vw;
				border: 1px solid var(--f1Color);
				margin: 2vw 2vw 0 2vw;
				padding: 2vw;
				border-radius: 5px;

				.image {
					width: 25vw;
					height: 25vw;
					margin: 0 2vw 0 0;
				}

				.other {
					display: flex;
					flex-direction: column;
					flex-grow: 1;

					.name {
						font-size: var(--font16Size);
						font-weight: bold;
					}

					.other_1 {
						font-size: var(--font14Size);
						color: var(--f85Color);

						text {
							font-weight: bold;
							padding: 0 2vw;
							color: var(--ff0Color);
						}
					}
				}
			}
		}
	}

	.scroll-view {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;

		.list-scroll-view {
			display: flex;
			flex-direction: row;
			flex-wrap: wrap;
		}
	}
</style>
