You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
4.3 KiB

6 months ago
  1. <template>
  2. <div class="total-wrap">
  3. <!-- 空白页 -->
  4. <empty v-if="tracesData.length === 0" tip='暂无物流信息'></empty>
  5. <div class="logistics-title">物流跟踪</div>
  6. <block v-for="(item, index) in tracesData" :key="index">
  7. <trackNode :is-first="index===tracesData.length-1" :is-newest="index===0" :is-main-node="item.isMainNode" :node-data="item"></trackNode>
  8. </block>
  9. </div>
  10. </template>
  11. <script>
  12. import trackNode from '@/components/trackNode.vue';
  13. import empty from "@/components/empty";
  14. export default {
  15. components: {
  16. trackNode,empty
  17. },
  18. data () {
  19. return {
  20. dhid:0,
  21. tracesData: [
  22. // {
  23. // acceptStation: '包裹已被吴亦发同学签收', // 节点描述
  24. // createTime: '2019-10-24 15: 27: 16',
  25. // status: 'COMPLETE', // 节点状态
  26. // phone: '', // 电话
  27. // statusName: '已签收', // 节点标题
  28. // isMainNode: true // 是否主节点,主节点前方展示icon
  29. // },
  30. // {
  31. // acceptStation: '由派送员蔡小坤同志配送,电话:',
  32. // createTime: '2019-10-24 15: 26: 41',
  33. // status: 'DELIVERING',
  34. // phone: '16677778888',
  35. // statusName: '运输中',
  36. // isMainNode: true
  37. // },
  38. // {
  39. // acceptStation: '已到XXX小区快递点',
  40. // createTime: '2019-10-24 15: 26: 41',
  41. // status: 'DELIVERING',
  42. // phone: '',
  43. // statusName: '运输中',
  44. // isMainNode: false
  45. // },
  46. // {
  47. // acceptStation: '已到海宁集散中心',
  48. // createTime: '2019-10-24 15: 26: 18',
  49. // status: 'DELIVERING',
  50. // phone: '',
  51. // statusName: '运输中',
  52. // isMainNode: false
  53. // },
  54. // {
  55. // acceptStation: '已到杭州集散中心',
  56. // createTime: '2019-10-24 15: 26: 07',
  57. // status: 'DELIVERING',
  58. // phone: '',
  59. // statusName: '运输中',
  60. // isMainNode: false
  61. // },
  62. // {
  63. // acceptStation: '包裹已到达余杭区集散中心',
  64. // createTime: '2019-10-24 15: 25: 54',
  65. // status: 'DELIVERING',
  66. // phone: '',
  67. // statusName: '运输中',
  68. // isMainNode: false
  69. // },
  70. // {
  71. // acceptStation: '快递员已上门取件',
  72. // createTime: '2019-10-24 15: 25: 17',
  73. // status: 'DELIVERING',
  74. // phone: '',
  75. // statusName: '已揽收',
  76. // isMainNode: false
  77. // },
  78. // {
  79. // acceptStation: '等待快递员上门揽件',
  80. // createTime: '2019-10-24 15: 25: 00',
  81. // status: 'WATTING_DELIVER',
  82. // phone: '',
  83. // statusName: '已发货',
  84. // isMainNode: true
  85. // },
  86. // {
  87. // acceptStation: '您的包裹正在打包',
  88. // createTime: '2019-10-24 15: 24: 00',
  89. // status: 'WATTING_DELIVER',
  90. // phone: '',
  91. // statusName: '待发货',
  92. // isMainNode: false
  93. // },
  94. // {
  95. // acceptStation: '订单支付成功,等待商家发货',
  96. // createTime: '2019-10-24 15: 22: 30',
  97. // status: 'PAYED',
  98. // statusName: '已支付',
  99. // isMainNode: true
  100. // },
  101. // {
  102. // acceptStation: '订单提交成功',
  103. // createTime: '2019-10-24 15: 22: 00',
  104. // status: 'WATTING_PAY',
  105. // statusName: '已下单',
  106. // isMainNode: true
  107. // }
  108. ]
  109. }
  110. },
  111. onLoad(e){
  112. console.log(e.dhid,'传过来');
  113. this.dhid=e.dhid;
  114. uni.showLoading({
  115. title:'加载中'
  116. })
  117. this.kdiinfo();
  118. },
  119. methods: {
  120. //轮播图
  121. async kdiinfo() {
  122. let getdata = await this.$api.kdiinfo({action:'kdiinfo',dhid:this.dhid});
  123. console.log(getdata.data,'返回')
  124. this.tracesData=getdata.data;
  125. uni.hideLoading()
  126. },
  127. }
  128. }
  129. </script>
  130. <style lang="scss" scoped>
  131. .total-wrap {
  132. width: 100vw;
  133. height: auto;
  134. box-sizing: border-box;
  135. padding: 20rpx 40rpx 200rpx;
  136. .logistics-title {
  137. height: 72rpx;
  138. box-sizing: border-box;
  139. padding: 36rpx 0 8rpx;
  140. line-height: 28rpx;
  141. color: #4B4B4B;
  142. font-size: 26rpx;
  143. font-family: 'PingFangSC-Medium';
  144. text-align: left;
  145. }
  146. }
  147. </style>