index.wxml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <wxs module="isUrl">
  2. var isUrl = function(item) {
  3. return item.indexOf('http') > -1;
  4. }
  5. module.exports = {
  6. isUrl: isUrl,
  7. }
  8. </wxs>
  9. <view class="page-section cells" wx:if="{{logisticsData.logisticsNo || logisticsData.company}}">
  10. <t-cell-group>
  11. <t-cell
  12. title="快递单号"
  13. t-class-title="wr-cell__title"
  14. t-class-note="wr-cell__value"
  15. t-class-left="order-group__left"
  16. wx:if="{{logisticsData.logisticsNo}}"
  17. bordered="{{false}}"
  18. >
  19. <text slot="note" class="logistics-no">{{logisticsData.logisticsNo}}</text>
  20. <view
  21. slot="right-icon"
  22. class="text-btn"
  23. hover-class="text-btn--active"
  24. bindtap="onLogisticsNoCopy"
  25. >复制
  26. </view>
  27. </t-cell>
  28. <t-cell
  29. title="物流公司"
  30. t-class-title="wr-cell__title"
  31. t-class-note="wr-cell__value"
  32. t-class-left="order-group__left"
  33. bordered="{{false}}"
  34. wx:if="{{logisticsData.company}}"
  35. note="{{logisticsData.company + (logisticsData.phoneNumber ? '-' + logisticsData.phoneNumber : '')}}"
  36. >
  37. <view
  38. slot="right-icon"
  39. class="text-btn"
  40. hover-class="text-btn--active"
  41. bindtap="onCall"
  42. wx:if="{{logisticsData.phoneNumber}}"
  43. >
  44. 拨打
  45. </view>
  46. </t-cell>
  47. </t-cell-group>
  48. </view>
  49. <view class="page-section cell-steps">
  50. <t-steps
  51. class="page-section__steps"
  52. t-class="steps"
  53. layout="vertical"
  54. current="{{active}}"
  55. >
  56. <t-step
  57. class="steps"
  58. t-class-title="step-title"
  59. wx:for="{{logisticsData.nodes}}"
  60. wx:for-item="item"
  61. wx:for-index="index"
  62. wx:key="index"
  63. title="{{item.title}}"
  64. icon="slot"
  65. >
  66. <block wx:if="{{isUrl.isUrl(item.icon)}}">
  67. <t-image
  68. class="cell-steps__imgWrapper"
  69. slot="icon"
  70. t-class="cell-steps__img"
  71. src="{{item.icon}}"
  72. />
  73. </block>
  74. <block wx:else>
  75. <t-icon
  76. slot="icon"
  77. size="32rpx"
  78. prefix="wr"
  79. color="{{index === 0 ? '#ef5433' : '#bbb'}}"
  80. name="{{item.icon}}"
  81. />
  82. </block>
  83. <view slot="content">
  84. <view class="step-desc">{{item.desc}}</view>
  85. <view class="step-date">{{item.date}}</view>
  86. </view>
  87. </t-step>
  88. </t-steps>
  89. </view>