<import src="/common/common.wxml" />
<login id='login' bind:refreshEvent="_refreshEvent">
</login>
<answer id='answer' TabBar='show'></answer>
<block wx:if="{{showview}}">
	<!-- <view class="headTab ">
		<text class="{{headTab == 1 ? 'h-active' : ''}}" bindtap="switchTab" data-index="1">进行中</text>
		<text class="{{headTab == 2 ? 'h-active' : ''}}" bindtap="switchTab" data-index="2">已结束</text>
	</view> -->
	<view class="box">
		<view wx:if="{{serviceList.length<=0}}">
			<template is="noRecord" data="{{...noRecord}}" />
		</view>
		<!-- <view wx:if="{{serviceList.length>=1}}" style='margin-top:100rpx;'> -->
		<view wx:if="{{serviceList.length>=1}}">
			<!--内容  -->
			<view class='record' wx:if="{{serviceList.length > 0}}">
				<block wx:for='{{serviceList}}' wx:for-item='item' wx:for-index='index' wx:key='index'>
					<view style='position:relative;height:214rpx;'>
						<view class='item' bindtap='goChat' data-item='{{item}}' data-index="{{index}}">
							<view class='photo'>
								<image class='info-img' src='{{item.image || noSrc}}' mode="aspectFill"  binderror="binderrorimg" data-errorIndex="{{index}}" ></image>
								<view class='unread' wx:if='{{item.unreadCount>0}}'>{{item.unreadCount}}</view>
							</view>
							<view class='info' style="{{index == serviceList.length -1?'border-bottom: none':''}}">
								<view class='info-name'>
								<!-- <text>{{item.name}}</text> -->
								<text>{{item.name}}</text> 
								<text style="margin-left:10rpx;color:rgba(51, 51, 51, 1);font-size:28rpx;font-weight:400;">{{item.title}}</text></view>
								<view class='chat-type'>{{item.work_unit}}</view>
								<view class='chat-type1'>服务类型：{{item.counsel}}</view>
								<!-- <view class='chat-record' wx:if="{{item.status!=2}}">{{item.MsgShow}}</view>
								  	<view class='chat-record' wx:if="{{item.status==2}}">问诊已结束</view> -->
								<view class='info-time'>{{item.MsgTimeStamp}}</view>
								<view class='info-desc'>
									<image wx:if="{{item.status==1}}" class="desc-img" src="/images/a.png"></image>
									<image wx:if="{{item.status==0}}" class="desc-img" src="/images/d.png"></image>
									<image wx:if="{{item.status==2}}" class="desc-img" src="/images/o.png"></image>
									<image wx:if="{{item.status==3}}" class="desc-img" src="/images/tuikuan.png"></image>
								</view>
							</view>
						</view>
						<view class='item_del' bindtap='delChat' data-index="{{index}}" data-userid='{{item.To_Account}}'>
							<text>删除</text>
						</view>
					</view>
				</block>
			</view>
		</view>
	</view>
</block>
<block wx:if="{{!showview}}">
	<!-- loading动画 -->
	<template is="loading" />
</block>