<!--pages/message/message.wxml-->
<block wx:if="{{isLogin}}">
	<view class="tabBar">
		<view bindtap="switchTab" data-index="{{0}}" class="item {{curIndex===0?'active':''}}">消息</view>
		<view bindtap="switchTab" data-index="{{1}}" class="item {{curIndex===1?'active':''}}">公告</view>
	</view>
	<view class="listWrap">
		<block wx:if="{{curIndex===0}}">
			<view class="msgList">
				<view bindtap="toDetail" data-id="{{item.msgId}}" wx:for="{{list}}" wx:key="msgId" class="msgItem">
					<view class="head">
						<image class="icon" src="../../images/ico_new@3x.png"></image>
						<text class="text">消息提示</text>
					</view>
					<view class="content">{{item.msgTitle}}</view>
					<view class="time">{{item.createTime}}</view>
				</view>
			</view>
			<view wx:if="{{pages>0&&finish===false}}" class="loadmore">上拉加载更多...</view>
			<view wx:if="{{pages>0&&finish===true}}" class="loadmore">已加载全部数据</view>
			<view wx:if="{{pages===0}}" class="noNews">
				<image class="pic" src="../../images/pic_no-news@3x.png" mode="widthFix"></image>
			</view>
		</block>
		<block wx:else>
			<view class="msgList">
				<view bindtap="toDetail" data-id="{{item.msgId}}" wx:for="{{listNotice}}" wx:key="msgId" class="msgItem">
					<view class="head">
						<image class="icon" src="../../images/ico_new@3x.png"></image>
						<text class="text">系统公告</text>
					</view>
					<view class="content">{{item.msgTitle}}</view>
					<view class="time">{{item.createTime}}</view>
				</view>
			</view>
			<view wx:if="{{pagesNotice>0&&finishNotice===false}}" class="loadmore">上拉加载更多...</view>
			<view wx:if="{{pagesNotice>0&&finishNotice===true}}" class="loadmore">已加载全部数据</view>
			<view wx:if="{{pagesNotice===0}}" class="noNews">
				<image class="pic" src="../../images/pic_no-news@3x.png" mode="widthFix"></image>
			</view>
		</block>
	</view>
</block>
<view wx:if="{{isLogin===false}}" class="noLogin">
	<view class="text">您还未登录，点击去登录</view>
	<button bindtap="toLogin" class="btn">去登录</button>
</view>
<tabbar-placeholder></tabbar-placeholder>