logisticsDeatil.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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}}</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. this.expressList = res.data.traces && res.data.traces.map(site => {
  32. return {
  33. title: site.acceptStation,
  34. desc: site.acceptTime
  35. }
  36. })
  37. }).catch(error => {
  38. console.log('物流追踪',error)
  39. this.$refs.uTips.show({
  40. title: error.data.msg,
  41. type: 'warning',
  42. })
  43. })
  44. },
  45. methods: {}
  46. }
  47. </script>
  48. <style lang="less" scoped>
  49. page {
  50. width: 100%;
  51. height: 100%;
  52. }
  53. .container {
  54. width: 100%;
  55. height: 100%;
  56. float: left;
  57. background-color: #f7f7f7;
  58. .express-info {
  59. width: 100%;
  60. height: 120px;
  61. float: left;
  62. background: #52A63A;
  63. box-sizing: border-box;
  64. padding: 34px 0 0 80px;
  65. background-size: 50px;
  66. background-position: 15px 30px;
  67. background-repeat: no-repeat;
  68. background-image: url(@/static/images/logisticsIcon.png);
  69. .express-text {
  70. width: 100%;
  71. height: 20px;
  72. float: left;
  73. line-height: 20px;
  74. font-size: 15px;
  75. font-family: PingFang SC;
  76. color: #FFFFFF;
  77. }
  78. }
  79. .express-list {
  80. width: 100%;
  81. height: calc(100% - 105px);
  82. float: left;
  83. background: #FFFFFF;
  84. box-sizing: border-box;
  85. padding: 10px 15px;
  86. box-shadow: 0px 1px 5px 0px rgba(102, 102, 102, 0.43);
  87. border-radius: 15px 15px 0px 0px;
  88. margin-top: -15px;
  89. overflow-y: auto;
  90. /deep/.uni-steps__column-line-item:first-child {
  91. .uni-steps__column-line--before {
  92. visibility: hidden;
  93. }
  94. }
  95. /deep/.uni-steps__column-text:first-child {
  96. .uni-steps__column-title {
  97. color: #333333 !important;
  98. margin-bottom: 4px;
  99. }
  100. }
  101. /deep/.uni-steps__column-line-item:last-child {
  102. .uni-steps__column-line--after {
  103. visibility: hidden;
  104. }
  105. }
  106. /deep/.uni-steps__column-text {
  107. border: none;
  108. }
  109. /deep/.uni-steps__column-check {
  110. .uni-icons {
  111. font-size: 22px !important;
  112. }
  113. }
  114. /deep/.uni-steps__column-circle {
  115. width: 8px;
  116. height: 8px;
  117. background: #DCDEE0 !important;
  118. }
  119. /deep/.uni-steps__column-line {
  120. background: #F2F3F5 !important;
  121. }
  122. /deep/.uni-steps__column-line--before {
  123. height: 14px;
  124. }
  125. /deep/.uni-steps__column-title {
  126. color: #666666 !important;
  127. margin-bottom: 4px;
  128. }
  129. /deep/.uni-steps__column-desc {
  130. color: #666666 !important;
  131. }
  132. /deep/.uni-steps__column-container {
  133. margin-right: 6px;
  134. }
  135. }
  136. }
  137. </style>