index.wxml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <wxs src="../../utils/filter.wxs" module="filters" />
  2. <view class="chat">
  3. <scroll-view scroll-y="true" class="content" scroll-top="{{scrollTop}}" enhanced show-scrollbar='{{false}}'
  4. refresher-enabled bindrefresherrefresh='getMsgDet' refresher-triggered="{{triggered}}">
  5. <block wx:for="{{list}}" wx:key="id">
  6. <view class="base someone" wx:if="{{uid!=item.senderUid}}">
  7. <image src="{{item.user.avatar}}" class="avatar" bindtap="jumpUserInfo" data-uid='{{item.senderUid}}' />
  8. <view class="contentBox">
  9. <view class="time">
  10. {{filters.formatDate(item.gmtCreated,1)}}
  11. </view>
  12. <view class="message" wx:if="{{item.type==1}}">{{item.content}}</view>
  13. <image src="{{item.content}}" wx:else class="msgImg" mode="widthFix" bindtap="previewImage"
  14. data-src="{{item.content}}" />
  15. </view>
  16. </view>
  17. <view class="base self" wx:else>
  18. <view class="contentBox">
  19. <view class="time">
  20. {{filters.formatDate(item.gmtCreated,1)}}
  21. </view>
  22. <view class="message" wx:if="{{item.type==1}}">{{item.content}}</view>
  23. <image src="{{item.content}}" wx:else class="msgImg" mode="widthFix" bindtap="previewImage"
  24. data-src="{{item.content}}" />
  25. </view>
  26. <image src="{{userInfo.avatar}}" class="avatar" bindtap="jumpUserInfo" data-uid='{{item.senderUid}}' />
  27. </view>
  28. </block>
  29. <view style="height: 240rpx;"></view>
  30. </scroll-view>
  31. <view class="inputBox {{isIos?'iosPadding':''}}">
  32. <input class="input" bindinput="bindKeyInput" value="{{value}}" placeholder="我有话说..." confirm-type='sendReply'
  33. maxlength="100" />
  34. <image src="/static/follow_3.png" class="sendImg" bindtap="chooseImage" />
  35. <view class="submit" bindtap="sendReply">发送</view>
  36. </view>
  37. </view>