chore: 合并前端修复并调整 Docker 镜像源

This commit is contained in:
yml2213
2026-05-21 12:26:45 +08:00
parent 5474d77799
commit e3518c791f
27 changed files with 54 additions and 72 deletions
@@ -1,8 +1,8 @@
import { computed, ref, type Ref, type ComputedRef } from 'vue'
import { computed, ref, type ComputedRef } from 'vue'
import { POLL_INTERVAL_MS, POLL_FAILURE_LIMIT } from './sessionConstants'
export interface UseSessionPollingOptions<T> {
export interface UseSessionPollingOptions {
/** Whether there is an active session used as a guard inside the poll loop. */
hasSession: ComputedRef<boolean>
/** Called on each poll tick (typically refreshSessionSummary). */
@@ -13,7 +13,7 @@ export interface UseSessionPollingOptions<T> {
pollWarningPrefix: string
}
export function useSessionPolling(options: UseSessionPollingOptions<unknown>) {
export function useSessionPolling(options: UseSessionPollingOptions) {
const { hasSession, onPollTick, pollWarningPrefix } = options
const pollWarningMessage = ref('')
@@ -102,7 +102,7 @@ export interface UseSessionPresentationOptions {
}
export function useSessionRoleFacts(options: UseSessionPresentationOptions) {
const { activityInfo, statusLabel, roleFactDefaults } = options
const { activityInfo, roleFactDefaults } = options
const roleFacts = computed<FactItem[]>(() => [
{
@@ -168,17 +168,17 @@ export function useSessionResultFacts(options: UseSessionResultFactsOptions) {
// ---------------------------------------------------------------------------
export function buildRedeemBlockedReason(options: {
detail: ComputedRef<unknown | null>
hasSession: ComputedRef<boolean>
loginTypeLabel: ComputedRef<string>
redeemLoading: ComputedRef<boolean>
roleReady: ComputedRef<boolean>
roleConfirmed: ComputedRef<boolean>
sessionNotice: ComputedRef<string>
detail: Ref<unknown | null>
hasSession: Ref<boolean>
loginTypeLabel: Ref<string>
redeemLoading: Ref<boolean>
roleReady: Ref<boolean>
roleConfirmed: Ref<boolean>
sessionNotice: Ref<string>
context: 'claim' | 'admin'
/** Claim-specific fields */
tokenStatus?: ComputedRef<string>
requiresSupportReview?: ComputedRef<boolean>
tokenStatus?: Ref<string>
requiresSupportReview?: Ref<boolean>
}): string {
const {
detail,
@@ -1,4 +1,4 @@
import { computed, ref, watch, type Ref, type ComputedRef } from 'vue'
import { computed, ref, watch, type ComputedRef } from 'vue'
/**
* Shared QR code display logic: renders the base64 QR image, tracks its
@@ -22,7 +22,6 @@ import { notifyTencentActionError } from './tencent/session-errors'
import {
useSessionPolling,
useSessionQrDisplay,
useSessionRoleFacts,
useSessionResultFacts,
buildRedeemBlockedReason,
resolveTaskStatusLabel,
@@ -92,7 +91,7 @@ export function useAdminManualRedeemPage() {
} = useSessionPolling({
hasSession: computed(() => Boolean(task.value?.taskId && hasSession.value)),
shouldKeepPolling: computed(() => shouldKeepPolling(detail.value)),
onPollTick: () => refreshSessionSummary({ silent: true }),
onPollTick: async () => { await refreshSessionSummary({ silent: true }) },
pollWarningPrefix: '人工兑换状态刷新失败',
})
@@ -122,11 +121,6 @@ export function useAdminManualRedeemPage() {
() => `请让客户使用${loginTypeLabel.value}扫码,并在手机上确认登录`,
)
const { roleFacts } = useSessionRoleFacts({
activityInfo,
statusLabel,
roleFactDefaults: { nickname: '等待客户登录' },
})
const proofValue = computed(() => manualRequest.value?.proofValue || order.value?.platformOrderId || '-')
@@ -230,9 +224,6 @@ export function useAdminManualRedeemPage() {
})
// ── Helpers ────────────────────────────────────────────────────────
function applyLoginTypeFromDetail(nextDetail: AdminManualRedeemDetail) {
loginType.value = syncLoginTypeFromDetail(nextDetail, loginType.value)
}
function restartPollingIfNeeded(nextDetail = detail.value) {
resetPolling()
@@ -17,7 +17,6 @@ import { notifyTencentActionError } from './tencent/session-errors'
import {
useSessionPolling,
useSessionQrDisplay,
useSessionRoleFacts,
useSessionResultFacts,
buildRedeemBlockedReason,
resolveTaskStatusLabel,
@@ -59,7 +58,7 @@ export function useClaimPage(token: string) {
} = useSessionPolling({
hasSession,
shouldKeepPolling: computed(() => shouldKeepPolling(detail.value)),
onPollTick: () => refreshSessionSummary({ silent: true }),
onPollTick: async () => { await refreshSessionSummary({ silent: true }) },
pollWarningPrefix: '领取状态刷新失败',
})
@@ -88,11 +87,6 @@ export function useClaimPage(token: string) {
() => `请使用${loginTypeLabel.value}扫描二维码,并在手机上确认登录`,
)
const { roleFacts } = useSessionRoleFacts({
activityInfo,
statusLabel,
roleFactDefaults: { nickname: '等待扫码登录' },
})
// Claim pages show 4 role facts, but original only had 3 (no area).
// Override roleFacts to match original exactly: