jiangli.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <script setup name="order">
  2. import Container from "@/components/Container/Container.vue";
  3. import { request } from "@/utils/request";
  4. import { ref, onMounted } from "vue";
  5. import utils from "@/utils/common";
  6. const orderList = ref([]);
  7. onMounted(async () => {
  8. const res = await request(
  9. "api/question_bank/question_reception/lottery_winning_record/list",
  10. {
  11. page: 1,
  12. limit: 999,
  13. }
  14. );
  15. orderList.value = res.data.data;
  16. });
  17. </script>
  18. <template>
  19. <Container
  20. title="订单记录"
  21. bgColor="#f8f8f8"
  22. :empty="!orderList.length"
  23. headerColor="#fff"
  24. text="暂无订单记录"
  25. >
  26. <view class="Container">
  27. <view class="card" v-for="item in orderList" :key="item.id">
  28. <view class="left">
  29. <view class="name">{{ item.reward_name }}</view>
  30. <view>中奖时间: {{ utils.timestampToString(item.insert_time) }}</view>
  31. </view>
  32. <!-- <view class="right">
  33. <view class="price" v-if="item.order_preferential_price > 0"
  34. >¥{{ item.order_preferential_price }}</view
  35. >
  36. <view class="price" v-if="item.order_preferential_price < 0.01"
  37. >赠送</view
  38. >
  39. <view class="line" v-if="item.order_original_price > 0">{{
  40. item.order_original_price
  41. }}</view>
  42. <view class="line" v-if="item.order_preferential_price < 0.01"></view>
  43. </view> -->
  44. </view>
  45. </view>
  46. </Container>
  47. </template>
  48. <style scoped lang="scss">
  49. @import "@/uni.scss";
  50. .Container {
  51. display: flex;
  52. flex-direction: column;
  53. gap: 16rpx;
  54. .card {
  55. background-color: #fff;
  56. padding: 24rpx 16rpx;
  57. border-radius: 16rpx;
  58. display: flex;
  59. justify-content: space-between;
  60. border-radius: 16rpx;
  61. font-family: PingFang SC, PingFang SC;
  62. font-weight: 500;
  63. font-size: 28rpx;
  64. .left {
  65. display: flex;
  66. flex-direction: column;
  67. gap: 8rpx;
  68. color: #666666;
  69. .name {
  70. color: $primary;
  71. }
  72. }
  73. .right {
  74. .price {
  75. color: $error;
  76. }
  77. .line {
  78. color: #999;
  79. text-decoration: line-through;
  80. }
  81. }
  82. }
  83. }
  84. </style>