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

	</view>
</template>

<script>
	export default {
		data() {
			return {
				navbarData:{
					title:'消息'
				},
				isAll:false,
				aaa:'rerererererererere'
			};
		},
		methods: {
			goToMesDetail() {
				uni.navigateTo({
					url: '/pages/hdxx/hdxx'
				});
			},
			qqq(){
				this.isAll=!this.isAll
				if(this.isAll){
					this.$refs.p.$el.classList.add('is-expanded')
					console.log(this.$refs.p.$el.classList);
				}else{
					this.$refs.p.$el.classList.remove('is-expanded')
					console.log(this.$refs.p.$el.classList);
				}
			}
		}
	}
</script>

<style lang="scss">
	
	// .content .p{
	// 	display:block;
	// 	overflow:hidden;
	// 	text-overflow:ellipsis;
	// 	white-space:nowrap;
	// 	/*设置文字溢出时显示省略号*/
		
	// }
	// .content .p.is-expanded{
	// 	overflow:visible;
	// 	white-space:normal;
	// 	/*文字溢出时不再显示省略号*/
	// }
	
	
	.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: 750rpx;
			padding: 30rpx 20rpx;
			// position: relative;

			.leftBox {
				display: flex;
				justify-content: flex-start;
				// flex-direction: row;
				// flex-wrap: nowrap;
				// align-items: center;

				.mesImg {
					width: 120rpx;
					height: 120rpx;
					// padding: 30rpx 5rpx;
					margin-right: 25rpx;
					image{
						width: 100%;
						height: 100%;
					}
				}

				.mesBrief {
					display: flex;
					flex-direction: column;
					justify-content: space-between;
					.tit{
						font-size: 20px;
						color: #333333;
					}
					.breif{
						font-size: 16px;
						color: #999999;
					}
				}
				.mesBrief:nth-child(1){
					font-size: 36rpx;
				}
				.mesBrief:nth-last-child(1){
					color: #999;
					padding: 10rpx 0 0 0;
				}
			}
			.right{
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				align-items: center;
				padding-top: 10px;
				.mesTime {
					color: #999;
					bottom: 30px;
				}
				
				.newMessage {
					
					width: 20rpx;
					height: 20rpx;
					background: red;
					border-radius: 10rpx;
				}
			}

			
		}
	}
</style>
