word.wxml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <import src="./chat-send-status.wxml"/>
  2. <import src="./voice.wxml"/>
  3. <template name="chat-word">
  4. <view style="width: 100%;display: flex;flex-direction: {{isMy?'row-reverse':'row'}};margin-bottom: {{index===length-1?150:20}}rpx;margin-top: 20rpx;">
  5. <image style="width: 70rpx;height: 70rpx;border-radius: 50%;margin-left: 15rpx;margin-right: 15rpx;"
  6. src="{{headUrl}}"/>
  7. <image wx:if="{{msgType==='text'||msgType==='voice'}}" class="chat-list-arrow-style"
  8. src="./../../image/chat/popu_{{isMy?'blue':'white'}}.png"/>
  9. <block wx:if="{{msgType==='text'}}">
  10. <view wx:if="{{msgType==='text'}}" class="{{isMy?'isMyWordStyle':'isOtherWordStyle'}}"
  11. style="border-radius: 10rpx;padding: 20rpx;font-size: 30rpx;max-width: 60%;"
  12. bindtap="chatTextItemClickEvent"
  13. data-index="{{index}}">{{content}}</view>
  14. </block>
  15. <block wx:if="{{msgType==='image'}}">
  16. <image wx:if="{{msgType==='image'}}" class="chat-list-pic-style" src="{{content}}"
  17. mode="aspectFill" bindtap="imageClickEvent" data-url="{{content}}"/>
  18. </block>
  19. <block wx:if="{{msgType==='voice'}}">
  20. <view style="width: {{(duration-1)*0.6+10}}%;border-radius: 10rpx;padding: 20rpx;font-size: 30rpx;max-width: 60%;display: flex;justify-content: {{isMy?'flex-end':'flex-start'}}"
  21. class="{{isMy?'isMyWordStyle':'isOtherWordStyle'}}"
  22. bindtap="chatVoiceItemClickEvent"
  23. data-voice-path="{{content}}"
  24. data-voice-duration="{{duration}}"
  25. data-is-my="{{isMy}}"
  26. data-index="{{index}}">
  27. <template is="voice-item" data="{{isMy:isMy,isPlaying:isPlaying}}"/>
  28. </view>
  29. <view class="voice-duration-style">{{duration}}"</view>
  30. </block>
  31. <!-- vr带房卡片 -->
  32. <block wx:if="{{msgType==='vr'}}">
  33. <view class="chat-item-vr" bindtap="vrCardClickEvent" data-vrLink="{{vr_link}}" data-house="{{house_id}}">
  34. <image src="{{image_url}}" mode="aspectFill" />
  35. <view class="vr-intro">
  36. <view class="chat-item-name">{{ house_name }}</view>
  37. </view>
  38. <view class="click-text" wx:if="{{ vr_link }}">进入云带看</view>
  39. </view>
  40. </block>
  41. <block wx:if="{{isMy}}">
  42. <template is="chat-send-status" data="{{sendStatus:sendStatus,index:index}}"/>
  43. </block>
  44. </view>
  45. </template>