logisticsDeatil.vue 3.6 KB

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