<template>
	<view class="messBox">
		<view class="mesItem" @click="goToMesDetail(1)">
			<view class="leftBox">
				<view class="mesImg">
					<image src="../../static/message/notice.svg" mode=""></image>
				</view>
				<view class="mesBrief">
					<view>活动通知</view>
					<view>活动报名成功</view>
				</view>
			</view>
			<view class="mesTime">07-12</view>
			<view class="newMessage"></view>
		</view>
		<view class="mesItem" @click="goToMesDetail(2)">
			<view class="leftBox">
				<view class="mesImg">
					<image src="../../static/message/system.svg" mode=""></image>
				</view>
				<view class="mesBrief">
					<view>系统通知</view>
					<view>已加入xxxxxx教研室</view>
				</view>
			</view>
			<view class="mesTime">07-12</view>
			<view class="newMessage"></view>
		</view>
		<view class="mesItem" @click="goToMesDetail(3)">
			<view class="leftBox">
				<view class="mesImg">
					<image src="../../static/message/subscribe.svg" mode=""></image>
				</view>
				<view class="mesBrief">
					<view>订阅消息</view>
					<view>xxx教研室更新了课程</view>
				</view>
			</view>
			<view class="mesTime">07-12</view>
			<view class="newMessage"></view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		methods: {
			goToMesDetail(i) {
				uni.navigateTo({
					url: '/pages/message/messageDetail?mesType=' + i
				});
			},
		},
	}
</script>

<style lang="scss">
	.messBox {
		background: #fff;
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: center;

		.mesItem {
			display: flex;
			flex-direction: row;
			flex-wrap: nowrap;
			align-items: flex-end;
			justify-content: space-between;
			width: 100%;
			padding: 20rpx;
			position: relative;

			.leftBox {
				display: flex;
				flex-direction: row;
				flex-wrap: nowrap;
				align-items: center;

				.mesImg {
					width: 180rpx;
					height: 180rpx;
					padding: 10rpx 5rpx;

					>uni-image {
						width: 100%;
						height: 100%;
					}
				}

				.mesBrief {
					display: flex;
					flex-direction: column;
					flex-wrap: nowrap;
					align-items: flex-start;
					padding: 0 0 0 20rpx;

					>:first-child {
						font-size: 36rpx;
					}

					>:last-child {
						color: #999;
						padding: 10rpx 0 0 0;
					}
				}
			}

			.mesTime {
				color: #999;
				position: absolute;
				bottom: 30px;
				right: 25px;
			}

			.newMessage {
				position: absolute;
				top: 80rpx;
				right: 80rpx;
				width: 20rpx;
				height: 20rpx;
				background: red;
				border-radius: 10rpx;
			}
		}
	}
</style>
