<!--pages/chat-detail/chat-detail.wxml-->
<!-- <scroll-view class="body">
    <view wx:for="{{list}}" wx:for-item="item" wx:key="i" data-id="id">
        <view class="row-left" wx:if="{{item.id % 2 == 1}}">
            <image class="photo" src="{{item.photo}}"></image>
            <text class="content">{{item.content}}</text>
        </view>
        <view class="row-right" wx:if="{{item.id % 2 == 0}}">
            <text class="content">{{item.content}}</text>
            <image class="photo" src="{{item.photo}}"></image>
        </view>
    </view>
</scroll-view>
<view class="input-bar">
    <input type="text" class="input" />
    <view class="send-btn" bindtap="sendMsg">发送</view>
</view> -->

<chat id="chat" username="{{username}}" chatType="singleChat"></chat>