<!-- 消息通知 -->
<template>
	<view class="message">
		<mNavbar title="消息通知" :leftClick="leftClick"></mNavbar>

		<!-- 新人礼包 -->
		<view class="message-top content">
			<image src="/static/message/message-icon.png" mode="widthFix"></image>

			<view class="pack-descript">
				<view class="new-person">
					<view class="title">新人注册礼包</view>
					<view class="tag">活动</view>
				</view>

				<view class="desc">新人领券，至高可领40元！</view>
			</view>

			<view class="time-icon">
				<view class="time">刚刚</view>
				<view class="icon">
					<image src="/static/message/arrow.png" mode="aspectFill"></image>
				</view>
			</view>
		</view>
		
		<!-- 聊天列表 -->
		<view class="recover-list content">
			<view v-for="item in 10" class="recover-item">
				<view class="img-box">
					<image src="/favicon.ico" mode="aspectFill"></image>
					<view class="available-ervice">
						<image src="/static/message/lightning-icon.png" mode="aspectFill"></image>
						<text>可服务</text>
					</view>
				</view>
				
				<view class="recover-content">
					<view class="name">刘莓莓</view>
					<view class="msg">好的亲亲</view>
				</view>
				
				<view class="time">刚刚</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import mNavbar from '@/components/base/m-navbar.vue'

	export default {
		components: {
			mNavbar
		},
		data() {
			return {

			}
		},
		methods: {
			//返回个人中心
			leftClick() {
				uni.switchTab({
					url: '/pages/index/center'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.message {
		background: #f5f5f5;
		min-height: 100vh;

		.message-top {
			display: flex;
			justify-content: space-between;
			align-items: center;

			image {
				width: 130rpx;
				height: 130rpx;
			}

			.pack-descript {
				width: calc(100% - 210rpx);
				height: 130rpx;
				display: flex;
				flex-direction: column;
				justify-content: center;

				.new-person {
					display: flex;
					
					.title{
						color: black;
						font-size: 28rpx;
						font-weight: bold;
						margin-right: 10rpx;
					}
					
					.tag{
						display: flex;
						align-items: center;
						background: #FBAB32;
						color: white;
						font-size: 20rpx;
						padding: 0rpx 10rpx;
						border-radius: 10rpx;
					}
				}

				.desc {
					font-size: 24rpx;
					color: #999999;
					margin-top: 10rpx;
				}
			}

			.time-icon {
				text-align: center;
				width: 60rpx;

				.time {
					font-size: 24rpx;
					color: #999999;
				}

				.icon {

					image {
						width: 25rpx;
						height: 25rpx;
						margin-top: 20rpx;
					}
				}
			}
		}
		
		.recover-list{
			
			
			.recover-item{
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding-bottom: 20rpx;
				border-bottom: 2px dashed #D3D1D1;
				margin-top: 20rpx;
				
				.img-box{
					position: relative;
					width: 120rpx;
					height: 120rpx;
					box-sizing: border-box;
					border: 2px solid #F6BEC3;
					border-radius: 10rpx;
					
					image{
						width: 100%;
						height: 100%;
						border-radius: 10rpx;
					}
					
					.available-ervice{
						display: flex;
						align-items: center;
						justify-content: center;
						width: 120rpx;
						position: absolute;
						bottom: 0;
						left: 0;
						color: white;
						font-size: 20rpx;
						background: #F6BEC3;
						
						image{
							width: 15rpx;
							height: 15rpx;
						}
					}
				}
				
				.recover-content{
					display: flex;
					flex-direction: column;
					justify-content: center;
					width: calc(100% - 170rpx);
					box-sizing: border-box;
					padding-left: 15rpx;
					
					.name{
						color: #333333;
						font-size: 30rpx;
						font-weight: bold;
					}
					
					.msg{
						color: #999999;
						font-size: 20rpx;
						margin-top: 5rpx;
					}
				}
				
				.time{
					width: 50rpx;
					color: #999999;
					font-size: 24rpx;
				}
			}
		}

		.content {
			width: 96%;
			margin: 0rpx auto;
		}
	}
</style>