logistics_list.vue 3.0 KB

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