update
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user