znzx.wxml 5.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!--pages/other/znzx/znzx.wxml-->
  2. <scroll-view class="containers" style="top: {{keyBoardHeight > 0? 'calc(' + keyBoardHeight + 'px * -1)':'0'}};" scroll-y scroll-into-view="{{scrollInto}}" scroll-with-animation>
  3. <view class="fill"></view>
  4. <view class="msg-box" wx:for="{{msgList}}" wx:key="index">
  5. <view wx:if="{{item.from == 'other'}}" class="msg_type msg_type_left">
  6. <view class="msg_headimg">
  7. <image src="/images/znzx/headimg.png" mode="widthFix" />
  8. </view>
  9. <view class="msg_content">
  10. <!-- 普通消息 -->
  11. <view wx:if="{{item.msg_type == 'type1'}}" class="msg_content_type1">{{item.content}}</view>
  12. <!-- 消息类型 1 -->
  13. <view wx:if="{{item.msg_type == 'type2'}}" class="msg_content_type2">
  14. <view class="msg_content_type2_title">{{item.title}}</view>
  15. <view class="msg_content_type2_link_box">
  16. <view class="msg_content_type2_link" wx:for="{{item.linkList}}" wx:for-item="item1" wx:for-index="index1" wx:key="index" data-item="{{item1}}" bind:tap="getAnswer">
  17. {{index1 + 1}}、{{item1.answerTitle}}
  18. </view>
  19. </view>
  20. <view class="msg_content_type2_subtitle">{{item.subTitle}}</view>
  21. <view class="msg_content_type2_sublink_box">
  22. <view class="msg_content_type2_sublink" wx:for="{{item.subLinkList}}" wx:for-item="item1" wx:for-index="index1" wx:key="index" data-item="{{item1}}" bind:tap="getAnswer">
  23. {{item1.intentTitle}}
  24. </view>
  25. </view>
  26. </view>
  27. <!-- 消息类型 2 -->
  28. <view wx:if="{{item.msg_type == 'type3'}}" class="msg_content_type3">
  29. <view class="msg_content_type3_title">{{item.title}}</view>
  30. <view class="msg_content_type3_link_box">
  31. <view class="msg_content_type3_link" wx:for="{{item.linkList}}" wx:for-item="item1" wx:for-index="index1" wx:key="index" data-item="{{item1}}" bind:tap="getAnswer">
  32. {{item1.intentTitle}}
  33. </view>
  34. </view>
  35. </view>
  36. <!-- 消息类型 3 -->
  37. <view wx:if="{{item.msg_type == 'type4'}}" class="msg_content_type4">
  38. <view class="msg_content_type4_title">{{item.title}}</view>
  39. <rich-text class="msg_content_type4_rich" nodes="{{item.content}}" data-img="{{item.imgSrcList}}" bind:tap="richTap" />
  40. <view class="msg_content_type4_link_box">
  41. <view class="msg_content_type4_link" wx:for="{{item.linkList}}" wx:for-item="item1" wx:for-index="index1" wx:key="index" data-item="{{item1}}" bind:tap="getDetail">
  42. <text>依据(点击查看详情)\n</text>{{item1.answerBasisTitle}}
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. <view wx:if="{{item.from == 'me'}}" class="msg_type msg_type_right">
  49. <view class="msg_content">{{item.content}}</view>
  50. <view class="msg_headimg">
  51. <image src="https://smzc-1253299035.cos.ap-nanjing.myqcloud.com/pdjh/miniProgrameYyQh/headimg.png" mode="widthFix" />
  52. </view>
  53. </view>
  54. </view>
  55. <view id="bottom" class="fill fill-bottom"></view>
  56. </scroll-view>
  57. <view class="control" style="padding-bottom: {{keyBoardHeight > 0? 'calc(' + keyBoardHeight + 'px + 20rpx)':'80rpx'}};">
  58. <view wx:if="{{inType === 1}}" class="control-box">
  59. <view class="control-voice" data-type="{{0}}" bind:tap="intype">
  60. <image src="/icon/msg_voice.png" mode="widthFix" />
  61. </view>
  62. <view class="control-input {{msg.content.length > 10?'':'control-input-auto'}}">
  63. <textarea auto-height disable-default-padding show-confirm-bar="{{false}}" adjust-position="{{false}}" confirm-type="send" placeholder="请输入您想咨询的问题..." value="{{msg.content}}" bindinput="input" bindconfirm="sendMsg" />
  64. </view>
  65. <view class="control-send {{msg.content.length > 0?'control-send-ok':''}}" bind:tap="{{msg.content.length > 0?'sendMsg':''}}">发送</view>
  66. </view>
  67. <view wx:if="{{inType === 0}}" class="control-box control-box-voice">
  68. <view class="control-voice" data-type="{{1}}" bind:tap="intype">
  69. <image src="/icon/msg_keyboard.png" mode="widthFix" />
  70. </view>
  71. <view class="control-input">
  72. <view class="control-input-voice {{startSpech?'control-input-voice-active':''}}" bind:touchstart="startVoice" bind:touchend="endVoice">{{startSpech?'松开 结束':'按住 说话'}}</view>
  73. <view class="voice-mask" wx:if="{{startSpech}}">
  74. <view class="voicing-box">
  75. <view class="voiceing" wx:for="{{10}}" wx:key="index"></view>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. <pop show="{{showDetail}}" bindclose="close">
  82. <view class="pop-title">{{detailInfo.ZLTITLE}}</view>
  83. <scroll-view class="popContain" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
  84. <rich-text class="popRich" nodes="{{detailInfo.ANSWERCONTENT}}" />
  85. </scroll-view>
  86. </pop>