|
@@ -1,19 +1,19 @@
|
|
<template>
|
|
<template>
|
|
<div class="prizeDrawBox">
|
|
<div class="prizeDrawBox">
|
|
- <city @inputChange="null"></city>
|
|
|
|
- <gridPage v-if="props.type === '1'" :disabled="!Number(luckyDrawsNum)" :lotteryId="props.lotteryId" @end="endCallback"></gridPage>
|
|
|
|
- <slotMachinePage v-if="props.type === '2'" :disabled="!Number(luckyDrawsNum)" :lotteryId="props.lotteryId" @end="endCallback"></slotMachinePage>
|
|
|
|
- <div class="numberBox mt-5">您还剩余<span class="colorBase">{{ luckyDrawsNum }}</span>次抽奖机会</div>
|
|
|
|
|
|
+ <!-- <city @inputChange="null"></city> -->
|
|
|
|
+ <div class="numberBox mb-5">恭喜您获得<span class="colorBase">1</span>次抽奖机会</div>
|
|
|
|
+ <gridPage v-if="props.type === '1'" :lotteryId="props.lotteryId" @end="endCallback"></gridPage>
|
|
|
|
+ <slotMachinePage v-if="props.type === '2'" :lotteryId="props.lotteryId" height="120" @end="endCallback"></slotMachinePage>
|
|
|
|
|
|
<CtDialog :visible="showDialog" titleClass="text-h6" :footer="false" :widthType="3" title="抽奖详情" @close="showDialog = false">
|
|
<CtDialog :visible="showDialog" titleClass="text-h6" :footer="false" :widthType="3" title="抽奖详情" @close="showDialog = false">
|
|
<div class="d-flex align-center flex-column">
|
|
<div class="d-flex align-center flex-column">
|
|
<svg-icon name="submit" size="300"></svg-icon>
|
|
<svg-icon name="submit" size="300"></svg-icon>
|
|
- <!-- {{ prizeData?.prompt }}
|
|
|
|
- <div class="mt-5 font-weight-bold color-primary text-decoration-underline cursor-pointer" @click="emit('success')">点击前往“我的-我的奖品”中领取</div> -->
|
|
|
|
- <!-- <div class="my-10">
|
|
|
|
|
|
+ {{ prizeData?.prompt }}
|
|
|
|
+ <!-- <div class="mt-5 font-weight-bold color-primary text-decoration-underline cursor-pointer" @click="emit('success')">点击前往“我的-我的奖品”中领取</div> -->
|
|
|
|
+ <div class="my-10">
|
|
<v-btn color="primary" variant="outlined" width="120" @click="showDialog = false">取 消</v-btn>
|
|
<v-btn color="primary" variant="outlined" width="120" @click="showDialog = false">取 消</v-btn>
|
|
<v-btn color="primary" width="120" class="ml-5" @click.stop="handleReceive">前往领取</v-btn>
|
|
<v-btn color="primary" width="120" class="ml-5" @click.stop="handleReceive">前往领取</v-btn>
|
|
- </div> -->
|
|
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</CtDialog>
|
|
</CtDialog>
|
|
</div>
|
|
</div>
|
|
@@ -21,11 +21,10 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
defineOptions({ name: 'prizeDraw'})
|
|
defineOptions({ name: 'prizeDraw'})
|
|
-import city from './prizeDraw/city.vue'
|
|
|
|
|
|
+// import city from './prizeDraw/city.vue'
|
|
import gridPage from './prizeDraw/grid.vue'
|
|
import gridPage from './prizeDraw/grid.vue'
|
|
import slotMachinePage from './prizeDraw/slotMachine.vue'
|
|
import slotMachinePage from './prizeDraw/slotMachine.vue'
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
-import { getNumByLotteryId } from '@/api/mall/prize'
|
|
|
|
|
|
|
|
const emit = defineEmits(['success'])
|
|
const emit = defineEmits(['success'])
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -36,13 +35,6 @@ const props = defineProps({
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
-// 获取抽奖次数
|
|
|
|
-const luckyDrawsNum = ref(0)
|
|
|
|
-const getLuckyNum = async () => {
|
|
|
|
- luckyDrawsNum.value = await getNumByLotteryId(props.lotteryId)
|
|
|
|
-}
|
|
|
|
-getLuckyNum()
|
|
|
|
-
|
|
|
|
// 抽中奖品信息
|
|
// 抽中奖品信息
|
|
const showDialog = ref(false)
|
|
const showDialog = ref(false)
|
|
const prizeData = ref({})
|
|
const prizeData = ref({})
|
|
@@ -50,7 +42,6 @@ const endCallback = (value) => {
|
|
console.log(value.prize, '抽中的奖品')
|
|
console.log(value.prize, '抽中的奖品')
|
|
prizeData.value = value.prize
|
|
prizeData.value = value.prize
|
|
showDialog.value = true
|
|
showDialog.value = true
|
|
- getLuckyNum()
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// const handleReceive = () => {
|
|
// const handleReceive = () => {
|
|
@@ -60,7 +51,7 @@ const endCallback = (value) => {
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
.prizeDrawBox {
|
|
.prizeDrawBox {
|
|
- padding: 40px;
|
|
|
|
|
|
+ padding: 20px 40px;
|
|
background-color: var(--default-bgc);
|
|
background-color: var(--default-bgc);
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|