logisticsDeatil.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="container">
  3. <view class="express-info">
  4. <view class="express-text">物流公司:{{expressData.company}}</view>
  5. <view class="express-text">物流单号:{{expressData.logisticCode ? expressData.logisticCode : ''}}</view>
  6. </view>
  7. <view class="express-list">
  8. <uni-steps :options="expressList" active-color="#008AFF" direction="column" :active="0"></uni-steps>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. const NET = require('@/utils/request')
  14. const API = require('@/config/api')
  15. export default {
  16. data() {
  17. return {
  18. expressData: {
  19. company: '',
  20. logisticCode: '',
  21. },
  22. expressList: []
  23. }
  24. },
  25. onLoad(options) {
  26. NET.request(API.getLogisticsDeatil + 'shunfeng/' + options.logisticCode, {}, 'GET').then(res => {
  27. this.expressData = {
  28. company: '顺丰',
  29. logisticCode: res.data.logisticCode,
  30. }
  31. if (res.data.traces.length) {
  32. this.expressList = res.data.traces && res.data.traces.map(site => {
  33. return {
  34. title: site.acceptStation,
  35. desc: site.acceptTime
  36. }
  37. })
  38. } else {
  39. this.expressList = [{title: ' ', desc: '暂无物流信息'}]
  40. }
  41. }).catch(error => {
  42. console.log('物流追踪',error)
  43. this.$refs.uTips.show({
  44. title: error.data.msg,
  45. type: 'warning',
  46. })
  47. })
  48. },
  49. methods: {}
  50. }
  51. </script>
  52. <style lang="less" scoped>
  53. page {
  54. width: 100%;
  55. height: 100%;
  56. }
  57. .container {
  58. width: 100%;
  59. height: 100%;
  60. float: left;
  61. background-color: #f7f7f7;
  62. .express-info {
  63. width: 100%;
  64. height: 120px;
  65. float: left;
  66. background: #52A63A;
  67. box-sizing: border-box;
  68. padding: 34px 0 0 80px;
  69. background-size: 50px;
  70. background-position: 15px 30px;
  71. background-repeat: no-repeat;
  72. background-image: url(@/static/images/logisticsIcon.png);
  73. .express-text {
  74. width: 100%;
  75. height: 20px;
  76. float: left;
  77. line-height: 20px;
  78. font-size: 15px;
  79. font-family: PingFang SC;
  80. color: #FFFFFF;
  81. }
  82. }
  83. .express-list {
  84. width: 100%;
  85. height: calc(100% - 105px);
  86. float: left;
  87. background: #FFFFFF;
  88. box-sizing: border-box;
  89. padding: 10px 15px;
  90. box-shadow: 0px 1px 5px 0px rgba(102, 102, 102, 0.43);
  91. border-radius: 15px 15px 0px 0px;
  92. margin-top: -15px;
  93. overflow-y: auto;
  94. /deep/.uni-steps__column-line-item:first-child {
  95. .uni-steps__column-line--before {
  96. visibility: hidden;
  97. }
  98. }
  99. /deep/.uni-steps__column-text:first-child {
  100. .uni-steps__column-title {
  101. color: #333333 !important;
  102. margin-bottom: 4px;
  103. }
  104. }
  105. /deep/.uni-steps__column-line-item:last-child {
  106. .uni-steps__column-line--after {
  107. visibility: hidden;
  108. }
  109. }
  110. /deep/.uni-steps__column-text {
  111. border: none;
  112. }
  113. /deep/.uni-steps__column-check {
  114. .uni-icons {
  115. font-size: 22px !important;
  116. }
  117. }
  118. /deep/.uni-steps__column-circle {
  119. width: 8px;
  120. height: 8px;
  121. background: #DCDEE0 !important;
  122. }
  123. /deep/.uni-steps__column-line {
  124. background: #F2F3F5 !important;
  125. }
  126. /deep/.uni-steps__column-line--before {
  127. height: 14px;
  128. }
  129. /deep/.uni-steps__column-title {
  130. color: #666666 !important;
  131. margin-bottom: 4px;
  132. }
  133. /deep/.uni-steps__column-desc {
  134. color: #666666 !important;
  135. }
  136. /deep/.uni-steps__column-container {
  137. margin-right: 6px;
  138. }
  139. }
  140. }
  141. </style>