多租户商城-商户小程序端
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.

142 lines
3.0 KiB

2 years ago
  1. <!-- 物流详情 -->
  2. <template>
  3. <view>
  4. <view class="content" style="padding-bottom:100upx;" v-if="steps.length >0">
  5. <view class="order-details-information mt20">
  6. <view class="order-title-box">
  7. <view class="order-title padd-l">
  8. <text class="line"></text>
  9. <text style="margin-left: 10upx;">物流信息</text>
  10. </view>
  11. </view>
  12. </view>
  13. <view class="logistics">
  14. <uni-steps :options="steps" direction="column" :active="0"></uni-steps>
  15. </view>
  16. </view>
  17. <view v-else class="emptyOrder-box flex-items-plus flex-column">
  18. <image class="emptyOrder-img" src="https://ceres.zkthink.com/static/img/bgnull.png"></image>
  19. <label class="font-color-999 fs26 mar-top-30">你还没有物流信息哦</label>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. const NET = require('../../utils/request')
  25. const API = require('../../config/api')
  26. import uniSteps from "@/components/uni-steps/uni-steps.vue"
  27. export default {
  28. data() {
  29. return {
  30. express:'',
  31. deliverFormid:'',
  32. steps:[]
  33. }
  34. },
  35. components: {uniSteps},
  36. onLoad(options) {
  37. this.express = options.express
  38. this.deliverFormid = options.deliverFormid
  39. this.getShippingTrace(this.express,this.deliverFormid)
  40. },
  41. methods: {
  42. //物流信息
  43. getShippingTrace(express,deliverFormid){
  44. NET.request(API.ShippingTrace,{
  45. express:express,
  46. deliverFormid:deliverFormid
  47. },"GET").then( res => {
  48. let traces = res.data
  49. let len = traces.length
  50. for(let i = 0; i < len; i++){
  51. let item = traces[i]
  52. this.steps.push({
  53. title: item.reason,
  54. desc: item.time,
  55. })
  56. }
  57. this.steps = this.steps.reverse()
  58. }).catch(res => {
  59. })
  60. },
  61. }
  62. }
  63. </script>
  64. <style lang="scss">
  65. .emptyOrder-box{
  66. margin-top: 70upx;
  67. .emptyOrder-img {
  68. width: 113upx;
  69. height: 98upx;
  70. }
  71. }
  72. page {
  73. background: #f7f7f7;
  74. }
  75. .logistics{
  76. padding: 20upx 20upx;
  77. }
  78. .content {
  79. padding: 0 0 120upx 0;
  80. }
  81. .order-details-information {
  82. background: #fff;
  83. flex-shrink: 0;
  84. display: flex;
  85. flex-direction: row;
  86. align-items: center;
  87. height: 98upx;
  88. }
  89. .order-details-information.padd {
  90. padding: 30upx;
  91. box-sizing: border-box;
  92. }
  93. .order-details-information .order-title {
  94. font-size: 30upx;
  95. margin-left: 30upx;
  96. color: #333;
  97. font-weight: 500;
  98. display: flex;
  99. flex-direction: row;
  100. align-items: center;
  101. }
  102. .order-details-information .order-title .line {
  103. width: 10upx;
  104. height: 30upx;
  105. background: #ff7911;
  106. margin-right: 10upx;
  107. }
  108. .order-details-information .info-box {
  109. margin-top: 30upx;
  110. }
  111. .order-details-information .info-box .item {
  112. display: flex;
  113. flex-direction: row;
  114. align-items: center;
  115. justify-content: space-between;
  116. font-size: 24upx;
  117. color: #666;
  118. margin-bottom: 20upx;
  119. }
  120. .order-details-information .info-box .item .copy-color {
  121. font-size: 24upx;
  122. color: #ff7911;
  123. }
  124. .arrow-down-img {
  125. width: 90upx;
  126. height: 90upx;
  127. padding: 30upx;
  128. box-sizing: border-box;
  129. }
  130. .mt20 {
  131. margin-top: 20upx;
  132. }
  133. </style>