index.wxml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <wxs module="_">
  2. module.exports.active = function (lastId, id) {
  3. return lastId === id;
  4. }
  5. module.exports.show = function (message, component) {
  6. return message && message.component === component;
  7. }
  8. </wxs>
  9. <!--module/chats/pages/index/index.wxml-->
  10. <view class="chats-container">
  11. <t-navbar title="对话管家" />
  12. <scroll-view
  13. id="scrollview"
  14. class="page-scroll__container"
  15. type="list"
  16. scroll-y
  17. enhanced="{{true}}"
  18. enable-passive
  19. style="height: calc(100vh - 180rpx); padding-bottom:{{paddingBottom}}rpx;"
  20. >
  21. <view class="system-wrapper">
  22. <view class="date">{{date}}</view>
  23. <view class="title">对话管家 已进入聊天</view>
  24. </view>
  25. <block wx:for="{{messages}}" wx:key="id">
  26. <chat-guide wx:if="{{(_.show(item, 'guide') && isShowGuide)}}" id="{{item.id}}" active="{{_.active(lastId, item.id)}}" bind:next="handle" bind:to="scrollIntoView" bind:nextType="nextType" bind:getCount="getCount" analysisCount="{{analysisCount}}" />
  27. <chat-questionnaire wx:if="{{_.show(item, 'questionnaire') && messageType}}" id="{{item.id}}" active="{{_.active(lastId, item.id)}}" bind:next="handle"
  28. bind:to="scrollIntoView" bind:nextType="nextType" messageType="{{messageType}}" workId="{{id}}" bind:boxBottom="boxBottom" />
  29. </block>
  30. <!-- 固定底部锚点,便于 lastId='bottom' 时稳定滚动到最底部 -->
  31. <view id="bottom" style="height: 1rpx;"></view>
  32. </scroll-view>
  33. <view class="tabbar-container">
  34. <tabbar tabbarValue="{{tabbarValue}}"></tabbar>
  35. </view>
  36. </view>