prizeDraw.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view v-if="showPrizeDraw">
  3. <!-- <luckyWheel></luckyWheel> -->
  4. <luckyGrid></luckyGrid>
  5. <!-- <slotMachine v-if="props.type === '2'" :lotteryId="lotteryId"></slotMachine> -->
  6. <!-- <view class="numberBox mt-5">您还剩余<span class="colorBase">{{ luckyDrawsNum }}</span>次抽奖机会</view> -->
  7. </view>
  8. </template>
  9. <script setup>
  10. // import luckyWheel from '@/pages/lucky/Wheel'
  11. import luckyGrid from '@/pages/lucky/Grid'
  12. // import slotMachine from '@/pages/lucky/slotMachine'
  13. // import PrizeApi from '@/sheep/api/prizeDraw'
  14. import { ref } from 'vue'
  15. // const props = defineProps({
  16. // skuId: [Number, String],
  17. // type: {
  18. // type:String,
  19. // default: '1'
  20. // }
  21. // })
  22. // // 获取抽奖次数
  23. // const luckyDrawsNum = ref(0)
  24. // const getLuckyNum = async () => {
  25. // luckyDrawsNum.value = await PrizeApi.getNumByLotteryId(lotteryId.value)
  26. // }
  27. const showPrizeDraw = ref(true)
  28. // const lotteryId = ref('')
  29. // const getLottery = async () => {
  30. // if (!props.skuId) return
  31. // const data = await PrizeApi.getPrizeByGoodsId(props.skuId)
  32. // lotteryId.value = data.id
  33. // showPrizeDraw.value = data && Object.keys(data).length > 0
  34. // if (showPrizeDraw.value) getLuckyNum()
  35. // }
  36. // getLottery()
  37. </script>
  38. <style lang="scss" scoped>
  39. .numberBox {
  40. font-size: 20px;
  41. font-weight: bold;
  42. padding: 2px 38px;
  43. text-align: center;
  44. }
  45. .colorBase {
  46. color: #00897B;
  47. margin: 0 6px;
  48. font-size: 22px;
  49. }
  50. </style>