OrderList.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view class="content">
  3. <view style="padding: 0rpx 22rpx; padding-top: 18rpx">
  4. <view class="img_box">
  5. <up-lazy-load
  6. :image="item?.goods[0]?.pic_url"
  7. class="img"
  8. lazy-load
  9. mode="aspectFit"
  10. ></up-lazy-load>
  11. </view>
  12. <text class="title">{{ item?.goods[0]["goodTitle"] }}</text>
  13. <view class="_price">
  14. <text class="icon">{{ symbol.symbol }} </text>
  15. <rich-text
  16. class="texts"
  17. :nodes="Moneyhtml(item?.amount, true)"
  18. ></rich-text>
  19. </view>
  20. <view class="dashed"></view>
  21. <view class="state">
  22. <text class="title">{{ t("当前状态") }}:</text>
  23. <text class="completed">{{ item.bz }}</text>
  24. <text class="icon">/</text>
  25. <text class="sum">{{ item.bz_count }}</text>
  26. </view>
  27. </view>
  28. <view class="button" @click="onCheck(item.goods[0])">
  29. <trans _t="查看并确认" />
  30. </view>
  31. </view>
  32. </template>
  33. <script setup>
  34. import { defineProps, defineEmits, computed } from "vue";
  35. import { Moneyhtml } from "@/utils";
  36. import { t } from "@/locale";
  37. import { useSystemStore } from "@/store";
  38. const useSystem = useSystemStore();
  39. const symbol = computed(() => useSystem.getSymbol);
  40. const props = defineProps({
  41. item: {
  42. type: Object,
  43. default: () => ({}),
  44. },
  45. });
  46. const emit = defineEmits(["onCheck"]);
  47. const onCheck = (item) => {
  48. emit("onCheck", item);
  49. };
  50. </script>
  51. <style lang="less" scoped>
  52. @import url("@/style.less");
  53. .content {
  54. overflow: hidden;
  55. border-radius: 20rpx;
  56. font-family: HarmonyOS Sans SC;
  57. .img_box {
  58. height: 160rpx;
  59. width: 160rpx;
  60. margin: 0 auto;
  61. .img {
  62. width: 100%;
  63. height: 100%;
  64. object-fit: cover;
  65. aspect-ratio: 1 / 1;
  66. border-radius: 8rpx;
  67. }
  68. }
  69. .title {
  70. .size(24rpx);
  71. line-height: 32rpx;
  72. .ellipsis(1);
  73. margin-top: 8rpx;
  74. }
  75. ._price {
  76. .ver(flex-end);
  77. color: var(--text-02);
  78. .size(32rpx);
  79. font-weight: 500;
  80. margin-top: 8rpx;
  81. .icon {
  82. margin-right: 8rpx;
  83. }
  84. .texts {
  85. /deep/ div {
  86. .ver(baseline);
  87. .price {
  88. }
  89. .decimal {
  90. .size(24rpx);
  91. }
  92. }
  93. }
  94. }
  95. .state {
  96. display: flex;
  97. align-items: flex-end;
  98. .size(24rpx);
  99. .title {
  100. margin: 0;
  101. margin-right: 10rpx;
  102. }
  103. .completed {
  104. .size(28rpx);
  105. color: var(--red);
  106. font-weight: 700;
  107. line-height: 38rpx;
  108. // font-variation-settings: "opsz" auto;
  109. }
  110. .sum,
  111. .icon {
  112. color: var(--text);
  113. .size(24rpx);
  114. font-weight: 500;
  115. }
  116. }
  117. .button {
  118. text-align: center;
  119. background-color: var(--black);
  120. padding: 10rpx;
  121. color: var(--light);
  122. .size(24rpx);
  123. min-height: 62rpx;
  124. margin-top: 14rpx;
  125. }
  126. }
  127. </style>