express.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <view class="express-info" v-if="!loadding">
  3. <view class="base-info p30">
  4. <view class="name">
  5. <text class="gray9">物流公司:</text>
  6. <text class="fb">{{express.express_name}}</text>
  7. </view>
  8. <view class="order-code pt20">
  9. <text class="gray9">物流单号:</text>
  10. <text class="fb red"> {{express.express_no}}</text>
  11. </view>
  12. </view>
  13. <view class="list">
  14. <view :class="index==0?'active item':'item'" v-for="(item, index) in express.list" :key="index">
  15. <view class="content">{{item.context}}-{{item.status}}</view>
  16. <view class="datetime">{{item.time}}</view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. data() {
  24. return {
  25. /*是否加载完成*/
  26. loadding:true,
  27. indicatorDots: true,
  28. autoplay: true,
  29. interval: 2000,
  30. duration: 500,
  31. /*订单id*/
  32. order_id: 0,
  33. /*快递信息*/
  34. express: {
  35. list: {},
  36. },
  37. };
  38. },
  39. onLoad(e) {
  40. uni.showLoading({
  41. title: '加载中'
  42. });
  43. this.order_id = e.order_id;
  44. },
  45. mounted() {
  46. /*获取数据*/
  47. this.getData();
  48. },
  49. methods: {
  50. /*获取数据*/
  51. getData() {
  52. let self = this;
  53. let order_id = self.order_id
  54. self._get('user.order/express', {
  55. order_id: order_id
  56. }, function(res) {
  57. self.express = res.data.express;
  58. // console.log(res.data.express);
  59. self.loadding=false;
  60. uni.hideLoading();
  61. });
  62. },
  63. }
  64. };
  65. </script>
  66. <style>
  67. .express-info .base-info {
  68. background: #ffffff;
  69. border-bottom: 1px solid #eeeeee;
  70. }
  71. .express-info .list {
  72. padding: 30rpx 30rpx 30rpx 50rpx;
  73. margin-top: 20rpx;
  74. border-top: 1px solid #eeeeee;
  75. background: #ffffff;
  76. }
  77. .express-info .list .item {
  78. position: relative;
  79. padding: 30rpx;
  80. padding-left: 40rpx;
  81. padding-right: 0;
  82. border-left: 1px solid #cccccc;
  83. }
  84. .express-info .list .item::before {
  85. display: block;
  86. content: '';
  87. position: absolute;
  88. top: 30rpx;
  89. left: -18rpx;
  90. width: 20rpx;
  91. height: 20rpx;
  92. border: 8rpx solid #ffffff;
  93. border-radius: 50%;
  94. background: #CCCCCC;
  95. }
  96. .express-info .list .item::after {
  97. display: block;
  98. content: '';
  99. position: absolute;
  100. top: 30rpx;
  101. left: -18rpx;
  102. width: 30rpx;
  103. height: 30rpx;
  104. border-radius: 50%;
  105. border: 4rpx solid #CCCCCC;
  106. }
  107. .express-info .list .item.active::before {
  108. background: #f00808;
  109. }
  110. .express-info .list .item.active::after {
  111. border: 4rpx solid #f00808;
  112. }
  113. .express-info .list .item {
  114. color: #999999;
  115. }
  116. .express-info .list .item.active {
  117. color: #f00808;
  118. }
  119. </style>