customerServe.wxml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!--pages/customerServe/customerServe.wxml-->
  2. <view class="head">
  3. <view style="font-size: 15px;color: #508FF4;">小喃为您服务!</view>
  4. <image src="/images/11.png"></image>
  5. </view>
  6. <view>
  7. <scroll-view scroll-y scroll-into-view='{{toView}}' style='height: {{scrollHeight}};padding: 17px 15px;box-sizing: border-box;'>
  8. <!-- <view class='scrollMsg'> -->
  9. <block wx:key wx:for='{{msgList}}' wx:for-index="index">
  10. <!-- 单个消息1 客服发出(左) -->
  11. <view wx:if='{{item.speaker=="server"}}' id='msg-{{index}}' style='display: flex;margin-bottom: 26px;'>
  12. <view>
  13. <image style='width: 38px;height: 38px;' src='/images/xn.png'></image>
  14. </view>
  15. <view style='width: 0; height: 0; margin-left: 2px; display: flex; align-items: center; z-index: 12;border-top: 7px solid transparent;border-bottom: 7px solid transparent;border-right: 15px solid #fff;'>
  16. </view>
  17. <view class='leftMsg'>{{item.content}}</view>
  18. </view>
  19. <!-- 单个消息2 用户发出(右) -->
  20. <view wx:else id='msg-{{index}}' style='display: flex; justify-content: flex-end;margin-bottom: 26px;'>
  21. <view class='rightMsg'>{{item.content}}</view>
  22. <view style='width: 0; height: 0; margin-right: 2px; display: flex; align-items: center; z-index: 12;border-top: 7px solid transparent;border-bottom: 7px solid transparent;border-left: 12px solid #D9ECFF ;'>
  23. </view>
  24. <view>
  25. <image style='width: 38px;height: 38px; border-radius: 10rpx;' src='/images/kh.png'></image>
  26. </view>
  27. </view>
  28. </block>
  29. <!-- </view> -->
  30. <!-- 占位 -->
  31. <view style='width: 100%; height: 67px;'></view>
  32. </scroll-view>
  33. <view class='inputRoom' style='bottom: {{inputBottom}}'>
  34. <input bindconfirm='sendClick' adjust-position='{{false}}' value='{{inputVal}}' confirm-type='send' bindfocus='focus' bindblur='blur' placeholder="请输入您想要问的问题~"></input>
  35. <view style="width: 122px;height: 4px;background: #060606;border-radius: 2px;"></view>
  36. </view>
  37. </view>