<template>
	<view class="order view">
		<view class="status_bar" v-if="index===0" :style="navHeight"></view>
		<view class="listview">
			<view class="cell-list">
				<text class="date">{{newsItem.CREATEDATE}}</text>
				<view class="cell-list-block">
					<view class="list-block-title">
						<image class="icon-address" src="@/static/image/message_notice@3x.png" mode="aspectFit"></image>
						<text class="list-block-title__text">{{newsItem.MSGTITLE}}</text>
					</view>
					<view class="cell-list-block__content">
						<text class="cell-list-block__title">{{newsItem.MSGCONTENT}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex'


	export default {
		props: {
			newsItem: {
				type: Object,
				default: () => {
					return {
						CREATEDATE: '',
						MSGCONTENT: '',
						MSGTITLE: '',
					}
				}
			},
			index: {
				type: Number,
				default: 0
			}
		},
		data() {
			return {

			}
		},
		created() {},
		computed: {
			navHeight() {
				return {
					'height': `${this.sysinfo.safeArea.top + 44}px`
				}
			},
			...mapState(['sysinfo'])
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.view {
		flex-direction: column;
	}

	/* #ifndef APP-PLUS */
	page {
		width: 100%;
		min-height: 100%;
		display: flex;
		background: #fff;
	}

	.status_bar {
		height: var(--status-bar-height);
	}

	/* #endif */

	.order {
		flex: 1;
		background: #f0f4f5;
		padding: 24rpx;
	}

	.listview {
		flex: 1;
		flex-direction: column;
	}

	.cell-list {
		flex-direction: column;
	}

	.date {
		font-size: 28rpx;
		color: #999999;
		font-size: 28rpx;
		text-align: center;
		margin-bottom: 24rpx;
	}

	.icon-address {
		width: 44rpx;
		height: 44rpx;
		margin-right: 16rpx;
	}

	.cell-list-block__content {
		display: flex;
		flex: 1;
		flex-direction: column;
		margin-bottom: 40rpx;
	}

	.cell-list-block__title {
		color: #333;
		font-size: 30rpx;
		flex: 1;
		align-items: center;
		margin-bottom: 4rpx;
	}

	.cell-list-block {
		overflow: hidden;
		display: flex;
		flex-direction: column;
		background: #fff;
		padding: 20rpx 24rpx;
		border-radius: 20rpx;
		// margin-bottom: 56rpx;
	}

	.list-block-title {
		display: flex;
		align-items: center;
		margin-bottom: 16rpx;
	}

	.list-block-title__text {
		color: #999999;
		font-size: 26rpx;
	}
</style>
