<!--packageH/chitchat/chatList/chatList.wxml-->

<van-tabs active="{{ activeTab }}" bind:change="swichTabTItem" wx:if="{{isEmployee}}">
    <van-tab title="客户聊天">
        <view class="blank" wx:if="{{employeeChatList.length <= 0}}">
            <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png" mode='widthFix' />
        </view>
        <view class="content" wx:else>
            <view wx:for="{{employeeChatList}}" wx:key="id" data-item="{{item}}" bindtap="toEmployeeChat">
                <chat-list-item item="{{item}}"></chat-list-item>
            </view>
        </view>
    </van-tab>
    <van-tab title="我的聊天">
        <view class="blank" wx:if="{{chatList.length <= 0}}">
            <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png" mode='widthFix' />
        </view>
        <view class="content"> 
            <view wx:for="{{chatList}}" wx:key="id" data-item="{{item}}" bindtap="enterChatPage">
                <chat-list-item item="{{item}}"></chat-list-item>
            </view>
        </view>
    </van-tab>
</van-tabs>

<block wx:if="{{!isEmployee}}">
    <view class="blank" wx:if="{{chatList.length <= 0}}">
        <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png" mode='widthFix' />
    </view>
    <view class="content">
        <view wx:for="{{chatList}}" wx:key="id" data-item="{{item}}" bindtap="enterChatPage">
            <chat-list-item item="{{item}}"></chat-list-item>
        </view>
    </view>
</block>

