优化连接过期验证与戒色信息-1
This commit is contained in:
@@ -671,6 +671,10 @@ export interface AdminTaskDetail {
|
||||
vnPhone: string
|
||||
bindUrl: string
|
||||
bindPreparedAt: string | null
|
||||
bindExpiresAt: string | null
|
||||
bindProbeAt: string | null
|
||||
bindProbeStatus: string
|
||||
bindProbeMessage: string
|
||||
}
|
||||
role: {
|
||||
status: string
|
||||
|
||||
@@ -85,6 +85,10 @@ export interface ClaimKuaishouCloudFlowInfo {
|
||||
vnId: number
|
||||
bindUrl: string
|
||||
bindPreparedAt: string | null
|
||||
bindExpiresAt: string | null
|
||||
bindProbeAt: string | null
|
||||
bindProbeStatus: string
|
||||
bindProbeMessage: string
|
||||
vnPhone: string
|
||||
roleName: string
|
||||
roleId: string
|
||||
|
||||
@@ -33,10 +33,23 @@ const order = computed(() => detail.value?.order || null)
|
||||
const orderItem = computed(() => detail.value?.orderItem || null)
|
||||
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 roleName = computed(() => flow.value?.role.name || flow.value?.binding.roleName || '')
|
||||
const roleId = computed(() => flow.value?.role.rid || flow.value?.binding.roleId || '')
|
||||
const isTicketVerified = computed(() => flow.value?.ticket.status === 'verified')
|
||||
const isBindingPrepared = computed(() => flow.value?.binding.prepareStatus === 'ready' && Boolean(String(flow.value?.binding.bindUrl || '').trim()))
|
||||
const isBindUrlExpired = computed(() => {
|
||||
const expiresAt = String(flow.value?.binding.bindExpiresAt || '').trim()
|
||||
if (!expiresAt) {
|
||||
return false
|
||||
}
|
||||
|
||||
const expiresTime = Date.parse(expiresAt)
|
||||
return Number.isFinite(expiresTime) && expiresTime <= Date.now()
|
||||
})
|
||||
const isBindingPrepared = computed(() => (
|
||||
flow.value?.binding.prepareStatus === 'ready'
|
||||
&& Boolean(String(flow.value?.binding.bindUrl || '').trim())
|
||||
&& !isBindUrlExpired.value
|
||||
))
|
||||
const isBindingPreparing = computed(() => flow.value?.binding.prepareStatus === 'pending')
|
||||
const canEnterBindingStep = computed(() => isTicketVerified.value && isBindingPrepared.value)
|
||||
const isRoleReady = computed(() => Boolean(roleName.value || roleId.value))
|
||||
@@ -408,7 +421,10 @@ onBeforeUnmount(() => {
|
||||
如果当前角色不正确,请重新打开绑定页完成重新绑定,然后刷新角色信息。
|
||||
</p>
|
||||
<p class="muted meta-line">
|
||||
最近刷新:{{ formatDateTime(flow.role.refreshedAt) }}
|
||||
最近刷新:{{ formatDateTime(flow.role.refreshedAt) }};链接有效期:{{ formatDateTime(flow.binding.bindExpiresAt) }}
|
||||
</p>
|
||||
<p v-if="flow.binding.bindProbeMessage" class="muted meta-line">
|
||||
链接检测:{{ flow.binding.bindProbeStatus || '-' }} / {{ flow.binding.bindProbeMessage }}
|
||||
</p>
|
||||
|
||||
<div class="action-row">
|
||||
@@ -425,7 +441,7 @@ onBeforeUnmount(() => {
|
||||
type="primary"
|
||||
size="large"
|
||||
:loading="confirmingRole"
|
||||
:disabled="!isBindingPrepared"
|
||||
:disabled="!isBindingPrepared || !isRoleReady"
|
||||
@click="confirmRole"
|
||||
>
|
||||
我已完成绑定,下一步
|
||||
|
||||
Reference in New Issue
Block a user