<template>
	<view>
		<view v-if="listmessage.length>0">
			<view v-for="(item,key) of listmessage" class="sign_list">
				<p v-if="item.title" style="font-size:15px;font-weight: 600;color: #0e0c0c;">{{item.title}}</p>
				<p style="margin:10px 0;">{{item.message}}</p>
				<view style="text-align: right;">
					{{item.sendTime}}
				</view>
			</view>	
		</view>
		<view v-if="listmessage.length==0" style="font-size:46rpx; font-weight: bold;
			color: #9D9D9D; text-align:center;margin-top:100px">
			暂无消息
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				listmessage:[]
			}
		},
		onShow() {
			let wxUserInfo = uni.getStorageSync('wxUserInfo');
			if(wxUserInfo){
				this.getmessage(wxUserInfo)
			}
			
		},
		onLoad() {
			// let wxUserInfo = uni.getStorageSync('wxUserInfo');
			// if(wxUserInfo){
			// 	this.getmessage(wxUserInfo)
			// }
		},
		methods: {
			getmessage(Info){
				this.http.quickGet(`/message/my?pageNum=1&pageSize=99&userId=${Info.userId}`,true).then(response => {
				     console.log('response',response)
				     if(response.data.code==200){
						 this.listmessage=response.data.rows
				     }
				 })
			},
		
		}
	}
</script>

<style>
	.sign_list{
		/* width:94vw; */
		/* margin:20px 3vw; */
		width:100vw;
		margin:2vh 0;
		background: #FFFFFF;
		padding:10px 25px;
		color: #666;
	}
</style>
