This commit is contained in:
yixu
2025-09-30 21:04:01 +08:00
parent b86d973303
commit f9a8716262

View File

@@ -120,10 +120,17 @@ watch(() => props.show, async (newVal) => {
let lottteryResult = null let lottteryResult = null
if (props.type === 'draw') { if (props.type === 'draw') {
lottteryResult = await Request("lottery/draw", { pool: 'game', consume_type: 'points' }) lottteryResult = await Request("lottery/draw", { pool: 'game', consume_type: 'points' })
// 监听请求失败,关闭组件
if (!lottteryResult || !lottteryResult.res || (lottteryResult.res.status !== 200 && lottteryResult.res.status !== 201)) {
emit('close')
loading.hide()
return
}
} else { } else {
if (!props.data) { if (!props.data) {
weui.alert("获取排名奖励出错,请刷新页面重试") weui.alert("获取排名奖励出错,请刷新页面重试")
emit('close') emit('close')
loading.hide()
return return
} }