logistics_list.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="logistics_list" :class="isShowBottom ? 'border_list' : ''">
  3. <view class="logistics_top" @click="selectRadio(item.id)">
  4. <view class="logistics_top_left">
  5. <view class="avater">
  6. <image class="img" :src="item.express?.icon"></image>
  7. </view>
  8. <view class="left_box">
  9. <view class="title">{{ item.express?.name }}</view>
  10. <view class="freight">
  11. <trans _t="运费" />:
  12. </view>
  13. <view class="amount">{{ symbol.symbol }}{{ item.first_price }}</view>
  14. </view>
  15. </view>
  16. <view class="logistics_top_right">
  17. <up-radio :name="item.id" class="radio" shape="circle" v-if="isShowBottom"></up-radio>
  18. <view class="period">
  19. <trans _t="邮寄周期" />:
  20. </view>
  21. <view class="days">{{ item.expdays }}</view>
  22. </view>
  23. </view>
  24. <view class="logistics_bottom" v-if="isShowBottom">
  25. <up-collapse :border="false">
  26. <up-collapse-item :border="false">
  27. <template #title>
  28. <view class="logistics_bottom_title">
  29. <image src="/static/shop/parcel.png" class="parcel" />
  30. <trans _t="报价说明" />
  31. </view>
  32. </template>
  33. <template #value>
  34. <view class="logistics_bottom_value">
  35. <trans _t="详情" />
  36. </view>
  37. </template>
  38. <text class="u-collapse-content">{{ item.content }}</text>
  39. </up-collapse-item>
  40. </up-collapse>
  41. </view>
  42. </view>
  43. </template>
  44. <script setup>
  45. import { ref, computed } from "vue";
  46. import { t } from "@/locale"
  47. import { useSystemStore } from "@/store";
  48. const useSystem = useSystemStore();
  49. const props = defineProps({
  50. item: {
  51. type: Object,
  52. default: () => ({})
  53. },
  54. isShowBottom: {
  55. type: Boolean,
  56. default: true
  57. }
  58. })
  59. const symbol = computed(() => useSystem.getSymbol);
  60. const emit = defineEmits(['change']);
  61. function selectRadio(id) {
  62. emit('change', id);
  63. }
  64. </script>
  65. <style lang="less" scoped>
  66. @import url('@/style.less');
  67. .logistics_list {
  68. padding: 16rpx 0;
  69. &.border_list {
  70. border-bottom: 1rpx solid var(--borderColor);
  71. }
  72. .logistics_top {
  73. .hor(space-between);
  74. &_left {
  75. .flex();
  76. .avater {
  77. width: 80rpx;
  78. height: 80rpx;
  79. border-radius: 50%;
  80. margin-right: 12rpx;
  81. .img {
  82. width: 100%;
  83. height: 100%;
  84. }
  85. }
  86. .left_box {
  87. .title {
  88. .size(28rpx);
  89. font-weight: 600;
  90. }
  91. .freight {
  92. .size(22rpx);
  93. margin: 8rpx 0;
  94. }
  95. .amount {
  96. .size(24rpx);
  97. color: var(--red);
  98. font-weight: 600;
  99. }
  100. }
  101. }
  102. &_right {
  103. text-align: center;
  104. .size(22rpx);
  105. .radio {
  106. .hor(flex-end);
  107. }
  108. .period {
  109. margin: 8rpx 0;
  110. }
  111. .days {}
  112. }
  113. }
  114. .logistics_bottom {
  115. padding: 16rpx 0 0 92rpx;
  116. &_title {
  117. .ver();
  118. .size(22rpx);
  119. color: var(--text-01);
  120. .parcel {
  121. width: 22rpx;
  122. height: 22rpx;
  123. margin-right: 8rpx;
  124. }
  125. }
  126. &_value {
  127. .size(22rpx);
  128. color: var(--text-01);
  129. }
  130. /deep/ .u-cell__body {
  131. padding: 0;
  132. }
  133. }
  134. }
  135. </style>