校验核销码会先检查 余额

This commit is contained in:
yml2213
2026-05-14 13:51:36 +08:00
parent 83cb2ff1fa
commit c7a9787814
3 changed files with 31 additions and 21 deletions
@@ -36,8 +36,9 @@ const task = computed(() => detail.value?.task || null)
const roleName = computed(() => flow.value?.binding.roleName || flow.value?.role.name || '')
const roleId = computed(() => flow.value?.binding.roleId || flow.value?.role.rid || '')
const isTicketVerified = computed(() => flow.value?.ticket.status === 'verified')
const isBindingPrepared = computed(() => flow.value?.binding.prepareStatus === 'ready')
const isBindingPrepared = computed(() => flow.value?.binding.prepareStatus === 'ready' && Boolean(String(flow.value?.binding.bindUrl || '').trim()))
const isBindingPreparing = computed(() => flow.value?.binding.prepareStatus === 'pending')
const canEnterBindingStep = computed(() => isTicketVerified.value && isBindingPrepared.value)
const isRoleReady = computed(() => Boolean(roleName.value || roleId.value))
const isRoleConfirmed = computed(() => String(task.value?.status || '').trim() === 'role_confirmed')
const isDispatched = computed(() => String(flow.value?.dispatch.status || '').trim() === 'success')
@@ -56,7 +57,7 @@ const currentStep = computed(() => {
return 3
}
if (isTicketVerified.value) {
if (canEnterBindingStep.value) {
return 2
}
@@ -71,7 +72,7 @@ const progressText = computed(() => {
return '角色已确认,等待兑换'
}
if (isTicketVerified.value) {
return isBindingPrepared.value ? '请完成扫码绑定' : '系统正在准备绑定资源'
return isBindingPrepared.value ? '请完成扫码绑定' : '绑定资源未准备完成,请重新验证核销码'
}
return '等待提交核销码'
})