express-list.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!-- 物流分包 -->
  2. <template>
  3. <view class="express-list-wrap u-p-b-30">
  4. <view class="tip-box u-flex u-col-center u-p-x-20">{{ expressList.length }}个包裹已发出</view>
  5. <view class="express-list u-m-b-20" v-for="express in expressList" :key="express.id" @tap="toExpressDetail(express.id)">
  6. <view class="u-flex u-row-between list-head u-p-x-20">
  7. <text class="list-status" v-if="express.log.length">{{ express.log[0].status_name }}</text>
  8. <view class="express-name">{{ express.express_name }}:{{ express.express_no }}</view>
  9. </view>
  10. <view class="list-content u-p-20">
  11. <view class="express-detail u-m-b-20" v-if="express.log.length">{{ express.log[0].content }}</view>
  12. <view class="goods-box u-flex u-col-center">
  13. <view class="goods-img-box" v-for="img in express.item" :key="img.id"><image class="goods-img" :src="img.goods_image" mode="aspectFill"></image></view>
  14. </view>
  15. <view class="all-goods">共{{ express.item.length }}件商品</view>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. components: {},
  23. data() {
  24. return {
  25. expressList: []
  26. };
  27. },
  28. computed: {},
  29. onLoad() {
  30. this.getExpressList();
  31. },
  32. methods: {
  33. jump(path, parmas) {
  34. this.$Router.push({
  35. path: path,
  36. query: parmas
  37. });
  38. },
  39. // 物流详情
  40. toExpressDetail(id) {
  41. this.jump('/pages/order/express/express-detail', { orderId: this.$Route.query.orderId, expressId: id });
  42. },
  43. // 包裹列表
  44. getExpressList() {
  45. let that = this;
  46. that.$http('order.expressList', {
  47. order_id: that.$Route.query.orderId
  48. }).then(res => {
  49. if (res.code === 1) {
  50. that.expressList = res.data;
  51. }
  52. });
  53. }
  54. }
  55. };
  56. </script>
  57. <style lang="scss">
  58. .tip-box {
  59. width: 750rpx;
  60. height: 84rpx;
  61. font-size: 30rpx;
  62. font-weight: 500;
  63. color: rgba(168, 112, 13, 1);
  64. background: rgba(255, 226, 182, 1);
  65. }
  66. // 物流包裹
  67. .express-list {
  68. background-color: #fff;
  69. .list-head {
  70. height: 76rpx;
  71. border-bottom: 1rpx solid rgba(223, 223, 223, 0.5);
  72. .list-status {
  73. font-size: 26rpx;
  74. font-weight: 500;
  75. color: rgba(168, 112, 13, 1);
  76. }
  77. .express-name {
  78. font-size: 26rpx;
  79. font-weight: 400;
  80. color: rgba(153, 153, 153, 1);
  81. }
  82. }
  83. .list-content {
  84. .express-detail {
  85. font-size: 28rpx;
  86. font-weight: 500;
  87. color: rgba(51, 51, 51, 1);
  88. }
  89. .goods-box {
  90. flex-wrap: wrap;
  91. .goods-img-box {
  92. width: 160rpx;
  93. height: 160rpx;
  94. overflow: hidden;
  95. margin-right: 22rpx;
  96. margin-bottom: 22rpx;
  97. &:nth-child(4n) {
  98. margin-right: 0;
  99. }
  100. .goods-img {
  101. width: 100%;
  102. height: 100%;
  103. }
  104. }
  105. }
  106. }
  107. }
  108. </style>