From e3518c791f96d25678f1be7b09b1af4333197bf2 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Thu, 21 May 2026 12:26:45 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=90=88=E5=B9=B6=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B9=B6=E8=B0=83=E6=95=B4=20Docker=20?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../composables/shared/useSessionPolling.ts | 6 +++--- .../shared/useSessionPresentation.ts | 20 +++++++++---------- .../composables/shared/useSessionQrDisplay.ts | 2 +- .../composables/useAdminManualRedeemPage.ts | 11 +--------- apps/frontend/src/composables/useClaimPage.ts | 8 +------- .../fulfillment/bindings/composables/types.ts | 2 +- .../useFulfillmentBindingsLookup.ts | 1 - .../AdminKuaishouCloudRuleSection.vue | 2 +- .../composables/useKuaishouCloudConfig.ts | 1 + .../composables/useKuaishouCloudNinetyone.ts | 6 +++--- .../admin/inventory/AdminInventoryView.vue | 2 -- .../composables/useAdminInventory.ts | 2 -- .../manual-redeem/AdminManualRedeemView.vue | 1 + .../AdminManualRedeemReviewCard.vue | 1 + .../AdminManualRedeemSummaryCard.vue | 2 +- .../AdminPlatformKuaishouEticketSection.vue | 2 +- .../composables/useAdminAgisoPlatform.ts | 2 +- .../useAdminKuaishouEticketPlatform.ts | 9 +++++---- .../useKuaishouEticketShopManager.ts | 4 ++-- .../tasks/composables/useAdminTaskDetail.ts | 11 ++-------- deploy/docker/backend-dev.Dockerfile | 2 +- deploy/docker/backend.Dockerfile | 4 ++-- deploy/docker/dev-caddy.Dockerfile | 2 +- deploy/docker/frontend.Dockerfile | 4 ++-- deploy/docker/ocr-worker.Dockerfile | 2 +- docker-compose.dev.yml | 6 +++--- docker-compose.yml | 11 +++++++--- 27 files changed, 54 insertions(+), 72 deletions(-) diff --git a/apps/frontend/src/composables/shared/useSessionPolling.ts b/apps/frontend/src/composables/shared/useSessionPolling.ts index c4399c11..a49a048a 100644 --- a/apps/frontend/src/composables/shared/useSessionPolling.ts +++ b/apps/frontend/src/composables/shared/useSessionPolling.ts @@ -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 { +export interface UseSessionPollingOptions { /** Whether there is an active session – used as a guard inside the poll loop. */ hasSession: ComputedRef /** Called on each poll tick (typically refreshSessionSummary). */ @@ -13,7 +13,7 @@ export interface UseSessionPollingOptions { pollWarningPrefix: string } -export function useSessionPolling(options: UseSessionPollingOptions) { +export function useSessionPolling(options: UseSessionPollingOptions) { const { hasSession, onPollTick, pollWarningPrefix } = options const pollWarningMessage = ref('') diff --git a/apps/frontend/src/composables/shared/useSessionPresentation.ts b/apps/frontend/src/composables/shared/useSessionPresentation.ts index 71b164b3..d6cc89e1 100644 --- a/apps/frontend/src/composables/shared/useSessionPresentation.ts +++ b/apps/frontend/src/composables/shared/useSessionPresentation.ts @@ -102,7 +102,7 @@ export interface UseSessionPresentationOptions { } export function useSessionRoleFacts(options: UseSessionPresentationOptions) { - const { activityInfo, statusLabel, roleFactDefaults } = options + const { activityInfo, roleFactDefaults } = options const roleFacts = computed(() => [ { @@ -168,17 +168,17 @@ export function useSessionResultFacts(options: UseSessionResultFactsOptions) { // --------------------------------------------------------------------------- export function buildRedeemBlockedReason(options: { - detail: ComputedRef - hasSession: ComputedRef - loginTypeLabel: ComputedRef - redeemLoading: ComputedRef - roleReady: ComputedRef - roleConfirmed: ComputedRef - sessionNotice: ComputedRef + detail: Ref + hasSession: Ref + loginTypeLabel: Ref + redeemLoading: Ref + roleReady: Ref + roleConfirmed: Ref + sessionNotice: Ref context: 'claim' | 'admin' /** Claim-specific fields */ - tokenStatus?: ComputedRef - requiresSupportReview?: ComputedRef + tokenStatus?: Ref + requiresSupportReview?: Ref }): string { const { detail, diff --git a/apps/frontend/src/composables/shared/useSessionQrDisplay.ts b/apps/frontend/src/composables/shared/useSessionQrDisplay.ts index 364fdcad..802d805e 100644 --- a/apps/frontend/src/composables/shared/useSessionQrDisplay.ts +++ b/apps/frontend/src/composables/shared/useSessionQrDisplay.ts @@ -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 diff --git a/apps/frontend/src/composables/useAdminManualRedeemPage.ts b/apps/frontend/src/composables/useAdminManualRedeemPage.ts index 4c4948a8..486d7b45 100644 --- a/apps/frontend/src/composables/useAdminManualRedeemPage.ts +++ b/apps/frontend/src/composables/useAdminManualRedeemPage.ts @@ -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() diff --git a/apps/frontend/src/composables/useClaimPage.ts b/apps/frontend/src/composables/useClaimPage.ts index e698b826..ff33d1e0 100644 --- a/apps/frontend/src/composables/useClaimPage.ts +++ b/apps/frontend/src/composables/useClaimPage.ts @@ -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: diff --git a/apps/frontend/src/views/admin/fulfillment/bindings/composables/types.ts b/apps/frontend/src/views/admin/fulfillment/bindings/composables/types.ts index d197c0f3..bc5c17c0 100644 --- a/apps/frontend/src/views/admin/fulfillment/bindings/composables/types.ts +++ b/apps/frontend/src/views/admin/fulfillment/bindings/composables/types.ts @@ -1,4 +1,4 @@ -import type { AdminFulfillmentBindingConfigItem, AdminObservedProductItem } from '@/types/admin' +import type { AdminObservedProductItem } from '@/types/admin' export type EditableBinding = { id: string diff --git a/apps/frontend/src/views/admin/fulfillment/bindings/composables/useFulfillmentBindingsLookup.ts b/apps/frontend/src/views/admin/fulfillment/bindings/composables/useFulfillmentBindingsLookup.ts index 272a7a6e..6b99cead 100644 --- a/apps/frontend/src/views/admin/fulfillment/bindings/composables/useFulfillmentBindingsLookup.ts +++ b/apps/frontend/src/views/admin/fulfillment/bindings/composables/useFulfillmentBindingsLookup.ts @@ -3,7 +3,6 @@ import { reactive, ref } from 'vue' import { lookupAdminFulfillmentBindingOrder } from '@/services/admin' import type { AdminFulfillmentLookupItem, AdminFulfillmentLookupResult } from '@/types/admin' -import type { ImportableProductCandidate } from './types' import type { useFulfillmentBindings } from './useFulfillmentBindings' export function useFulfillmentBindingsLookup( diff --git a/apps/frontend/src/views/admin/fulfillment/kuaishou-cloud/components/AdminKuaishouCloudRuleSection.vue b/apps/frontend/src/views/admin/fulfillment/kuaishou-cloud/components/AdminKuaishouCloudRuleSection.vue index 355df8eb..04695087 100644 --- a/apps/frontend/src/views/admin/fulfillment/kuaishou-cloud/components/AdminKuaishouCloudRuleSection.vue +++ b/apps/frontend/src/views/admin/fulfillment/kuaishou-cloud/components/AdminKuaishouCloudRuleSection.vue @@ -68,7 +68,7 @@ const emit = defineEmits<{
全部展开 - 启用整条配置 收起已完成 diff --git a/apps/frontend/src/views/admin/fulfillment/kuaishou-cloud/composables/useKuaishouCloudConfig.ts b/apps/frontend/src/views/admin/fulfillment/kuaishou-cloud/composables/useKuaishouCloudConfig.ts index 1d69e1a4..5a7d465f 100644 --- a/apps/frontend/src/views/admin/fulfillment/kuaishou-cloud/composables/useKuaishouCloudConfig.ts +++ b/apps/frontend/src/views/admin/fulfillment/kuaishou-cloud/composables/useKuaishouCloudConfig.ts @@ -528,6 +528,7 @@ export function useKuaishouCloudConfig() { // consume shops getKuaishouConsumeShopOptions, findKuaishouConsumeShop, + getDefaultKuaishouConsumeShop, formatKuaishouConsumeShopOption, handleKuaishouConsumeShopSelected, // collapse diff --git a/apps/frontend/src/views/admin/fulfillment/kuaishou-cloud/composables/useKuaishouCloudNinetyone.ts b/apps/frontend/src/views/admin/fulfillment/kuaishou-cloud/composables/useKuaishouCloudNinetyone.ts index a82a3afc..af95e43d 100644 --- a/apps/frontend/src/views/admin/fulfillment/kuaishou-cloud/composables/useKuaishouCloudNinetyone.ts +++ b/apps/frontend/src/views/admin/fulfillment/kuaishou-cloud/composables/useKuaishouCloudNinetyone.ts @@ -1,6 +1,6 @@ -import { computed, nextTick, reactive, ref } from 'vue' +import { computed, reactive, ref } from 'vue' -import { showError, showSuccess } from '@/lib/feedback' +import { showSuccess } from '@/lib/feedback' import { fetchAdminNinetyoneOrders } from '@/services/admin' import type { AdminNinetyoneOrderItem } from '@/types/admin' @@ -39,7 +39,7 @@ export function useKuaishouCloudNinetyone( function createItemFromNinetyoneOrder(item: AdminNinetyoneOrderItem): EditableItem { const productNo = String(item.productNo || '').trim() const productName = String(item.productName || productNo).trim() - const defaultShop = config.getDefaultKuaishouConsumeShop ? config.findKuaishouConsumeShop() : null + const defaultShop = config.getDefaultKuaishouConsumeShop() const shopOpts = config.getKuaishouConsumeShopOptions() const shop = defaultShop || (shopOpts.length > 0 ? shopOpts[0] : null) return { diff --git a/apps/frontend/src/views/admin/inventory/AdminInventoryView.vue b/apps/frontend/src/views/admin/inventory/AdminInventoryView.vue index 407ea47b..ab3f0761 100644 --- a/apps/frontend/src/views/admin/inventory/AdminInventoryView.vue +++ b/apps/frontend/src/views/admin/inventory/AdminInventoryView.vue @@ -32,7 +32,6 @@ const { singleDisplayValue, bulkText, skuSuggestionsLoading, - inventorySkuSuggestions, entrySkuSuggestions, // actions loadInventoryItems, @@ -50,7 +49,6 @@ const { formatInventoryStatus, getGroupSuggestion, // utils - hasAdminRole, formatAdminDateTime, } = useAdminInventory() diff --git a/apps/frontend/src/views/admin/inventory/composables/useAdminInventory.ts b/apps/frontend/src/views/admin/inventory/composables/useAdminInventory.ts index 9c85aa54..c7acd5e0 100644 --- a/apps/frontend/src/views/admin/inventory/composables/useAdminInventory.ts +++ b/apps/frontend/src/views/admin/inventory/composables/useAdminInventory.ts @@ -6,8 +6,6 @@ import { fetchAdminInventoryItems, fetchAdminInventorySkuSuggestions, importAdminInventoryItems, - invalidateAdminInventoryItem, - releaseAdminInventoryItem, } from '@/services/admin' import type { AdminInventoryItemListItem, diff --git a/apps/frontend/src/views/admin/manual-redeem/AdminManualRedeemView.vue b/apps/frontend/src/views/admin/manual-redeem/AdminManualRedeemView.vue index 389d115e..3d21f3c0 100644 --- a/apps/frontend/src/views/admin/manual-redeem/AdminManualRedeemView.vue +++ b/apps/frontend/src/views/admin/manual-redeem/AdminManualRedeemView.vue @@ -190,6 +190,7 @@ const taskDetailLink = computed(() => :copy-screenshot="copyScreenshot" :download-screenshot="downloadScreenshot" :open-preview="() => (screenshotPreviewVisible = true)" + :screenshot-empty-title="screenshotEmptyTitle" /> void downloadScreenshot: () => void openPreview: () => void + screenshotEmptyTitle?: string } defineProps() diff --git a/apps/frontend/src/views/admin/manual-redeem/components/AdminManualRedeemSummaryCard.vue b/apps/frontend/src/views/admin/manual-redeem/components/AdminManualRedeemSummaryCard.vue index 5f2e11ca..2c8701d0 100644 --- a/apps/frontend/src/views/admin/manual-redeem/components/AdminManualRedeemSummaryCard.vue +++ b/apps/frontend/src/views/admin/manual-redeem/components/AdminManualRedeemSummaryCard.vue @@ -1,7 +1,7 @@