<template>
<div class="notice">
	<div v-for="(item,index) in list" class="noticeItem" @click="getNoticeItem(item)">
		<view style="flex: 1;">
			<div class="noticeTitle">{{item.notice_title}}</div>
			<div class="time">{{item.create_time}}</div>
		</view>
		<u-icon name="arrow-right"></u-icon>
	</div>
</div>
</template>

<script>
import { getNoticeList } from '@/api/user.js';
export default{
	data(){
		return{
			list:[]
		}
	},
	methods:{
		getNoticeList(){
			getNoticeList().then(res=>{
				
				this.list= res.data.list
			})
		},
		getNoticeItem(item){
			uni.navigateTo({
				url:'/pages/huitong/huitongbao/noticeItem?id='+item.notice_id
			})
		}
	},
	onLoad() {
		this.getNoticeList()
	}
}
</script>

<style lang="scss" scoped>
.notice{
	min-height:calc(100vh);
	.noticeItem{
		padding:39rpx 29rpx;
		background: #fff;
		border-radius: 10px;
		margin:24rpx;
		display: flex;
		align-items: center;
		.noticeTitle{
		
			font-weight: 400;
			font-size: 30rpx;
			color: #333333;
		}
		.time{
			
			font-weight: 400;
			font-size: 24rpx;
			color: #999999;
			margin-top: 26rpx;
		}
	}
}
</style>