feat(新年活动): 打开弹窗统一使用同个方法,确保打开前关闭其他弹窗
This commit is contained in:
parent
47789db1a9
commit
f1f7d04e28
@ -62,7 +62,7 @@
|
||||
:src="imageUrl(getImgName('rulesBt'))"
|
||||
alt=""
|
||||
style="display: block; width: 25vw"
|
||||
@click="ruleShow = true"
|
||||
@click="openPopup('rule')"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -512,7 +512,7 @@
|
||||
:src="imageUrl(getImgName('historyBt'))"
|
||||
alt=""
|
||||
style="width: 15vw; position: absolute; top: 18vw; right: 4vw"
|
||||
@click="historyShow = true"
|
||||
@click="openPopup('history')"
|
||||
/>
|
||||
|
||||
<!-- 抽奖转盘 -->
|
||||
@ -958,7 +958,7 @@
|
||||
src="/src/assets/icon/helpWhite.png"
|
||||
alt=""
|
||||
class="ruleBt"
|
||||
@click="helpShow = true"
|
||||
@click="openPopup('help')"
|
||||
/>
|
||||
<!-- 名称 -->
|
||||
<div
|
||||
@ -2058,6 +2058,25 @@ const exchangeCoinBt = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 打开弹窗
|
||||
const openPopup = (type) => {
|
||||
closedPopup() //先关闭其他弹窗
|
||||
switch (type) {
|
||||
case 'result':
|
||||
resultShow.value = true
|
||||
break
|
||||
case 'help':
|
||||
helpShow.value = true
|
||||
break
|
||||
case 'history':
|
||||
historyShow.value = true
|
||||
break
|
||||
case 'rule':
|
||||
ruleShow.value = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭弹窗
|
||||
const closedPopup = () => {
|
||||
resultShow.value = false
|
||||
@ -2176,7 +2195,7 @@ const sweepstakes = async (consecutive = 1) => {
|
||||
}
|
||||
}
|
||||
getDrawRecords() // 获取中奖记录
|
||||
resultShow.value = true
|
||||
openPopup('result') //打开中奖结果弹窗
|
||||
isRolling.value = false
|
||||
} catch (error) {
|
||||
isRolling.value = false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user