prizeDrawContent.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!-- -->
  2. <template>
  3. <div class="px-5">
  4. <div class="d-flex justify-space-between color-666">
  5. <div class="pt-2" style="font-size: 25px;">房券列表</div>
  6. <div class="d-flex">
  7. <!-- <span class="cursor-pointer active" >当前账户积分</span>
  8. <span class="septal-line"></span>
  9. <span class="cursor-pointer active" >兑换记录</span> -->
  10. <div style="width: 200px;" class="mt-2">
  11. <v-text-field
  12. v-model="content"
  13. variant="outlined"
  14. label="关键字查找"
  15. hide-details
  16. color="primary"
  17. density="compact"
  18. append-inner-icon="mdi-magnify"
  19. @click:append-inner="handleSearch"
  20. @keyup.enter="handleSearch"
  21. >
  22. </v-text-field>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="goods-box mt-5">
  27. <v-card v-for="val in dataList" :key="val.id" class="goods-box-item" elevation="2" style="background-color: #00ad9b;" @click="null">
  28. <div style="width: 100%; height: 200px;">
  29. <v-img :src="val.url" :aspect-ratio="1" style="border-radius: 8px;"></v-img>
  30. </div>
  31. <div class="text-center pa-3 pb-2 mt-5" style=" border-top: 2px dashed #b7b7b7; color: #fff;">
  32. <div class="ellipsis-2">{{ val.name }}</div>
  33. <div class="font-size-12 mt-2">{{ val.time }}</div>
  34. </div>
  35. </v-card>
  36. </div>
  37. </div>
  38. </template>
  39. <script setup>
  40. defineOptions({name: 'GoodsItem-prizeDrawContent'})
  41. import { ref } from 'vue'
  42. const emit = defineEmits(['login'])
  43. const content = ref('')
  44. const handleSearch = () => {}
  45. // 数据
  46. const dataList = ref([
  47. { name: '凯悦酒店1866/2晚的房券-大床带双早', point: 8000, url: 'https://img1.baidu.com/it/u=2383065711,2021783868&fm=253&fmt=auto&app=138&f=JPEG?w=719&h=500', time: '2025.02.01-2025.02.30' },
  48. { name: '房券-高端酒店房券', point: 12000, url: 'https://img1.baidu.com/it/u=1781363061,1773318172&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', time: '2025.01.01-2025.12.30' },
  49. { name: '金茂万丽免房券', point: 5000, url: 'https://img1.baidu.com/it/u=1791205046,4251623717&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375', time: '2025.01.01-2025.12.30' },
  50. { name: '苏州昆山阳澄喜柯大酒店1晚套餐通兑券(住园景/全湖景尊享房+双人份豪华早餐+可自选蟹宴/价值198元正餐+免费使用泳池健身房)', point: 2000, url: 'https://img2.baidu.com/it/u=4056160349,3161141178&fm=253&fmt=auto&app=138&f=JPEG?w=668&h=500', time: '2025.01.01-2025.12.30' },
  51. { name: '上海万怡酒店房券+迪士尼门票', point: 500, url: 'https://picx.zhimg.com/v2-d21746f72d02ee821e35c6db11c0935f_r.jpg?source=1940ef5c', time: '2025.01.01-2025.12.30' }
  52. ])
  53. </script>
  54. <style scoped lang="scss">
  55. .active:hover {
  56. color: var(--v-primary-base) !important;
  57. }
  58. .goods-box {
  59. width: 100%;
  60. display: flex;
  61. flex-wrap: wrap;
  62. &-item {
  63. // height: 330px;
  64. padding: 12px;
  65. width: calc((100% - 48px) / 4);
  66. margin: 0 12px 12px 0;
  67. &:nth-child(4n) {
  68. margin-right: 0;
  69. }
  70. }
  71. }
  72. </style>