<template>
	<view class="notice-list">
		<image src="/static/icon/pagebj.png" mode="" class="listbj"></image>
		<view class="align-items" style="padding: 42rpx 0 0 0;">
			<back></back>
			<view class="title-text">
				公告列表
			</view>
		</view>
		<view class="notice" v-for="(item,index) in list" :key="index" >
			<view>
				<view class="justify-content">
					<view class="font-forty">
						{{item.title}}
					</view>
					<view class="font-twenty-eight gray">
						{{item.time}}
					</view>
				</view>
				<view class="font-thirty-two black" style="margin: 30rpx 0;">
					 <rich-text :nodes="item.text"></rich-text> 
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	import service from '@/api/index.js'
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad() {
			this.lists()
		},
		methods: {
			toDetail(url){
				console.log(url)
				uni.navigateTo({
					url 
				})
			},
			lists(){
				service.getNoticeList().then(res=>{
					// console.log('getNoticeList',res)
					this.list = res
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.notice-list{
		position: relative;
	}
	.notice {
		margin: 30rpx 20rpx;
		padding: 20rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 0rpx 14rpx #ccc;
		border-radius: 10rpx;
	}
	.listbj{
		position: absolute;
		width: 100%;
		height: 400rpx;
		z-index: -1;
	}
	.text {
		border-left: 15rpx solid #3857F3;
		padding-left: 20rpx;
	}
	.title-text{
		font-size: 38rpx;
		color: #fff;
		margin: 0 0 0 186rpx;
	}
	.back-icon.data-v-026711bc {
	    background-color:transparent;
	}
	.font-forty{
		font-size: 36rpx;
	}
	.font-twenty-eight{
		font-size: 32rpx;
	}
</style>
