logisticsDeatil.vue 3.1 KB

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