index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!-- 物流详情 -->
  2. <template>
  3. <view>
  4. <JHeader title="订单物流信息" width="50" height="50" style="padding: 24upx 0 0;"></JHeader>
  5. <view v-if="steps.length > 0" class="content" style="padding-bottom:100upx;">
  6. <view class="order-details-information mt20">
  7. <view class="order-title-box">
  8. <view class="order-title padd-l">
  9. <text class="line"></text>
  10. <text style="margin-left: 10upx;">物流信息</text>
  11. </view>
  12. </view>
  13. </view>
  14. <view class="logistics">
  15. <tui-steps direction="column" :items="steps" spacing="180rpx" :active-steps="0"></tui-steps>
  16. </view>
  17. </view>
  18. <view v-else class="emptyOrder-box flex-items-plus flex-column">
  19. <image class="emptyOrder-img" src="../../../static/images/new-business/shop/bgnull.png"></image>
  20. <label class="font-color-999 fs26 mar-top-30">你还没有物流信息哦~</label>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import { getOrderDileveryShippingTraceApi } from '../../../api/anotherTFInterface'
  26. export default {
  27. name: 'LogisticsInfo',
  28. data() {
  29. return {
  30. express: '',
  31. deliverFormid: '',
  32. steps: []
  33. }
  34. },
  35. onLoad(options) {
  36. this.express = options.express
  37. this.deliverFormid = options.deliverFormid
  38. this.getShippingTrace(this.express, this.deliverFormid)
  39. },
  40. methods: {
  41. // 物流信息
  42. getShippingTrace(express, deliverFormid) {
  43. getOrderDileveryShippingTraceApi({
  44. express,
  45. deliverFormid
  46. }).then((res) => {
  47. const traces = res.data
  48. const len = traces.length
  49. for (let i = 0; i < len; i++) {
  50. const item = traces[i]
  51. this.steps.push({
  52. title: item.reason,
  53. desc: item.time
  54. })
  55. }
  56. this.steps = this.steps.reverse()
  57. })
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="less" scoped>
  63. .emptyOrder-box {
  64. margin-top: 70upx;
  65. .emptyOrder-img {
  66. width: 113upx;
  67. height: 98upx;
  68. }
  69. }
  70. page {
  71. background: #f7f7f7;
  72. }
  73. .logistics {
  74. padding: 20upx 20upx;
  75. }
  76. .content {
  77. padding: 0 0 120upx 0;
  78. }
  79. .order-details-information {
  80. background: #fff;
  81. flex-shrink: 0;
  82. display: flex;
  83. flex-direction: row;
  84. align-items: center;
  85. height: 98upx;
  86. }
  87. .order-details-information .order-title {
  88. font-size: 30upx;
  89. margin-left: 30upx;
  90. color: #333;
  91. font-weight: 500;
  92. display: flex;
  93. flex-direction: row;
  94. align-items: center;
  95. }
  96. .order-details-information .order-title .line {
  97. width: 10upx;
  98. height: 30upx;
  99. background: #ff7911;
  100. margin-right: 10upx;
  101. }
  102. .mt20 {
  103. margin-top: 20upx;
  104. }
  105. </style>