guide.wxml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <wxs module="_">
  2. module.exports.getClassName = function (active) {
  3. return active ? '' : 'disabled';
  4. }
  5. module.exports.cellClass = function (active, isLast) {
  6. var cls = 'cell-border-gradient';
  7. if (!active) cls += ' disabled';
  8. if (isLast) cls += ' no-border';
  9. return cls;
  10. }
  11. </wxs>
  12. <!--module/chats/components/guide/guide.wxml-->
  13. <view class="chat-card left steward-wrapper">
  14. <view class="chat-card__avatar ">
  15. <image src="../../assets/robot.png" mode="aspectFill" />
  16. </view>
  17. <view class="chat-card__content">
  18. <t-cell t-class="cell-border-gradient" bordered="{{true}}" >
  19. <view slot="title" class="title">
  20. <text>请选择想要操作的业务</text>
  21. </view>
  22. </t-cell>
  23. <t-cell
  24. t-class="cell-border-gradient {{_.getClassName(active)}}"
  25. t-class-hover="custom-cell-hover"
  26. t-class-title="health-analysis-title"
  27. title="1、{{i18n.chats.analysis}}(剩余{{analysisCount}}次)"
  28. hover="{{active}}"
  29. bind:tap="handleA"
  30. style="--td-cell-hover-color: #F5F5F5;"
  31. >
  32. <t-icon name="chevron-right" color="#CCCCCC" size="40rpx" slot="note" />
  33. </t-cell>
  34. <t-cell
  35. t-class="cell-border-gradient {{_.getClassName(active)}}"
  36. t-class-hover="custom-cell-hover"
  37. t-class-title="health-analysis-title"
  38. title="2、{{i18n.chats.healthIndex}}"
  39. hover="{{active}}"
  40. bind:tap="handleB"
  41. style="--td-cell-hover-color: #F5F5F5;"
  42. >
  43. <t-icon name="chevron-right" color="#CCCCCC" size="40rpx" slot="note" />
  44. </t-cell>
  45. <t-cell
  46. t-class="{{_.cellClass(active, !i18n.chats.consult)}}"
  47. t-class-hover="custom-cell-hover"
  48. t-class-title="health-analysis-title"
  49. title="3、{{i18n.chats.healthData}}"
  50. hover="{{active}}"
  51. bind:tap="handleC"
  52. style="--td-cell-hover-color: #F5F5F5;"
  53. >
  54. <t-icon name="chevron-right" color="#CCCCCC" size="40rpx" slot="note" />
  55. </t-cell>
  56. <t-cell
  57. wx:if="{{i18n.chats.consult}}"
  58. t-class="{{_.cellClass(active, true)}}"
  59. t-class-hover="custom-cell-hover"
  60. t-class-title="health-analysis-title"
  61. title="4、{{i18n.chats.consult}}"
  62. hover="{{active}}"
  63. bind:tap="handleE"
  64. style="--td-cell-hover-color: #F5F5F5;"
  65. >
  66. <t-icon name="chevron-right" color="#CCCCCC" size="40rpx" slot="note" />
  67. </t-cell>
  68. <!--
  69. <t-cell
  70. t-class="{{_.getClassName(active)}}"
  71. t-class-hover="custom-cell-hover"
  72. t-class-title="health-analysis-title"
  73. title="4、返回首页"
  74. bordered="{{false}}"
  75. hover="{{active}}"
  76. bind:tap="handleD"
  77. style="--td-cell-hover-color: #F5F5F5;"
  78. >
  79. <t-icon name="chevron-right" color="#CCCCCC" size="40rpx" slot="note" />
  80. </t-cell>
  81. -->
  82. </view>
  83. </view>
  84. <block wx:if="{{result.length}}">
  85. <view class="chat-card right">
  86. <view class="chat-card__avatar ">
  87. <user-avatar></user-avatar>
  88. </view>
  89. <view class="chat-card__content">
  90. <t-cell bordered="{{false}}">
  91. <view slot="title">
  92. <div wx:for="{{result}}" wx:key="*this">{{item}}</div>
  93. </view>
  94. </t-cell>
  95. </view>
  96. </view>
  97. <view class="chat-card left">
  98. <view class="chat-card__avatar ">
  99. <image src="../../assets/robot.png" mode="aspectFill" />
  100. </view>
  101. <view class="chat-card__content">
  102. <t-cell bordered="{{false}}" title="好的,我们已更新了相关指标数据。"></t-cell>
  103. </view>
  104. </view>
  105. </block>
  106. <block wx:if="{{result2}}">
  107. <!-- <view class="chat-card right">
  108. <view class="chat-card__avatar ">
  109. <user-avatar></user-avatar>
  110. </view>
  111. <view class="chat-card__content">
  112. <t-cell bordered="{{false}}">
  113. <view slot="title">
  114. <div wx:for="{{result}}" wx:key="*this">{{item}}</div>
  115. </view>
  116. </t-cell>
  117. </view>
  118. </view> -->
  119. <view class="chat-card left">
  120. <view class="chat-card__avatar ">
  121. <image src="../../assets/robot.png" mode="aspectFill" />
  122. </view>
  123. <view class="chat-card__content">
  124. <t-cell bordered="{{false}}" title="好的,我们已更新了您的健康信息相关数据。"></t-cell>
  125. </view>
  126. </view>
  127. </block>