style: 修复 frontend Prettier 格式检查失败
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,8 +22,8 @@ import PageHeader from '@/components/admin/PageHeader'
|
|||||||
import {
|
import {
|
||||||
buildOpen91QueryDevMock,
|
buildOpen91QueryDevMock,
|
||||||
createAffiliateDashDevMock,
|
createAffiliateDashDevMock,
|
||||||
createKuaishouIndustryVoucherDevMock,
|
createKuaishouIndustryVoucherDevMock,
|
||||||
fetchDevMockStatus,
|
fetchDevMockStatus,
|
||||||
type DevMockCreateResult,
|
type DevMockCreateResult,
|
||||||
type DevMockKuaishouIndustryVoucherResult,
|
type DevMockKuaishouIndustryVoucherResult,
|
||||||
type DevMockOpen91QueryResult,
|
type DevMockOpen91QueryResult,
|
||||||
@@ -45,8 +45,6 @@ export default function AdminDevMockPage() {
|
|||||||
const status = statusQuery.data?.data
|
const status = statusQuery.data?.data
|
||||||
const enabled = Boolean(status?.enabled)
|
const enabled = Boolean(status?.enabled)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const affiliateDashMutation = useMutation({
|
const affiliateDashMutation = useMutation({
|
||||||
mutationFn: createAffiliateDashDevMock,
|
mutationFn: createAffiliateDashDevMock,
|
||||||
onSuccess: (response) => {
|
onSuccess: (response) => {
|
||||||
@@ -126,7 +124,6 @@ export default function AdminDevMockPage() {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Row gutter={[16, 16]}>
|
<Row gutter={[16, 16]}>
|
||||||
|
|
||||||
<Col xs={24} xl={12}>
|
<Col xs={24} xl={12}>
|
||||||
<Card title="1. affiliate-dash 领取(mock 二维码/提交发货)" bordered={false}>
|
<Card title="1. affiliate-dash 领取(mock 二维码/提交发货)" bordered={false}>
|
||||||
<AffiliateDashMockForm
|
<AffiliateDashMockForm
|
||||||
|
|||||||
@@ -69,11 +69,7 @@ import { hasAdminRole } from '@/utils/admin-auth'
|
|||||||
import { buildAdminLocalTablePagination } from '@/utils/admin-pagination'
|
import { buildAdminLocalTablePagination } from '@/utils/admin-pagination'
|
||||||
import { formatAdminDateTime } from '@/utils/admin-time'
|
import { formatAdminDateTime } from '@/utils/admin-time'
|
||||||
|
|
||||||
type PlatformTab =
|
type PlatformTab = 'notifications' | 'kuaishouIndustry' | 'affiliateDash' | 'pdd'
|
||||||
| 'notifications'
|
|
||||||
| 'kuaishouIndustry'
|
|
||||||
| 'affiliateDash'
|
|
||||||
| 'pdd'
|
|
||||||
|
|
||||||
type NotificationConfigResponse = {
|
type NotificationConfigResponse = {
|
||||||
filePath: string
|
filePath: string
|
||||||
@@ -86,12 +82,7 @@ type ScheduledJobsState = {
|
|||||||
runtime: AdminScheduledJobRuntimeState[]
|
runtime: AdminScheduledJobRuntimeState[]
|
||||||
}
|
}
|
||||||
|
|
||||||
const platformTabs: PlatformTab[] = [
|
const platformTabs: PlatformTab[] = ['notifications', 'kuaishouIndustry', 'affiliateDash', 'pdd']
|
||||||
'notifications',
|
|
||||||
'kuaishouIndustry',
|
|
||||||
'affiliateDash',
|
|
||||||
'pdd',
|
|
||||||
]
|
|
||||||
|
|
||||||
export default function AdminPlatformShopsPage() {
|
export default function AdminPlatformShopsPage() {
|
||||||
const [searchParams, setSearchParams] = useSearchParams()
|
const [searchParams, setSearchParams] = useSearchParams()
|
||||||
@@ -122,17 +113,13 @@ export default function AdminPlatformShopsPage() {
|
|||||||
setErrorMessage('')
|
setErrorMessage('')
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const [
|
const [notificationResponse, scheduledJobsResponse, industryResponse, affiliateDashResponse] =
|
||||||
notificationResponse,
|
await Promise.all([
|
||||||
scheduledJobsResponse,
|
fetchAdminNotificationConfig(),
|
||||||
industryResponse,
|
fetchAdminScheduledJobsConfig(),
|
||||||
affiliateDashResponse,
|
fetchAdminKuaishouIndustrySourceConfig(),
|
||||||
] = await Promise.all([
|
fetchAdminAffiliateDashConfig(),
|
||||||
fetchAdminNotificationConfig(),
|
])
|
||||||
fetchAdminScheduledJobsConfig(),
|
|
||||||
fetchAdminKuaishouIndustrySourceConfig(),
|
|
||||||
fetchAdminAffiliateDashConfig(),
|
|
||||||
])
|
|
||||||
|
|
||||||
setNotificationConfig(notificationResponse.data)
|
setNotificationConfig(notificationResponse.data)
|
||||||
setScheduledJobs(scheduledJobsResponse.data)
|
setScheduledJobs(scheduledJobsResponse.data)
|
||||||
@@ -1839,15 +1826,10 @@ function AffiliateDashPlatformPanel() {
|
|||||||
</Space>
|
</Space>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card
|
<Card size="small" title={`权威中英映射表(内置 ${builtinSkuRows.length} 条)`}>
|
||||||
size="small"
|
|
||||||
title={`权威中英映射表(内置 ${builtinSkuRows.length} 条)`}
|
|
||||||
>
|
|
||||||
<Typography.Paragraph type="secondary" style={{ marginBottom: 12 }}>
|
<Typography.Paragraph type="secondary" style={{ marginBottom: 12 }}>
|
||||||
91 店商品编码使用中文名;正式商品请改后端常量表
|
91 店商品编码使用中文名;正式商品请改后端常量表
|
||||||
<Typography.Text code>
|
<Typography.Text code>apps/backend/.../affiliate-dash/sku-mapping.ts</Typography.Text>
|
||||||
apps/backend/.../affiliate-dash/sku-mapping.ts
|
|
||||||
</Typography.Text>
|
|
||||||
,与平台商品目录对齐。
|
,与平台商品目录对齐。
|
||||||
</Typography.Paragraph>
|
</Typography.Paragraph>
|
||||||
<Table<SkuMappingRow>
|
<Table<SkuMappingRow>
|
||||||
|
|||||||
@@ -5,11 +5,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|||||||
import { useParams } from 'react-router'
|
import { useParams } from 'react-router'
|
||||||
|
|
||||||
import { showError, showSuccess } from '@/lib/feedback'
|
import { showError, showSuccess } from '@/lib/feedback'
|
||||||
import {
|
import { fetchClaimDetail, submitAffiliateDashClaim, submitClaimUid } from '@/services/claim'
|
||||||
fetchClaimDetail,
|
|
||||||
submitAffiliateDashClaim,
|
|
||||||
submitClaimUid,
|
|
||||||
} from '@/services/claim'
|
|
||||||
import type { ClaimDetailData } from '@/types/claim'
|
import type { ClaimDetailData } from '@/types/claim'
|
||||||
|
|
||||||
import { AffiliateDashClaimPanel, AffiliateDashResultStep } from './ClaimAffiliateDashSteps'
|
import { AffiliateDashClaimPanel, AffiliateDashResultStep } from './ClaimAffiliateDashSteps'
|
||||||
|
|||||||
@@ -87,11 +87,7 @@ export function createClaimSnapshot(detail: ClaimDetailData | null) {
|
|||||||
isRedeemFailed,
|
isRedeemFailed,
|
||||||
isCompleted,
|
isCompleted,
|
||||||
})
|
})
|
||||||
const resultVariant: ResultVariant = isRedeemFailed
|
const resultVariant: ResultVariant = isRedeemFailed ? 'warning' : isCompleted ? 'success' : 'info'
|
||||||
? 'warning'
|
|
||||||
: isCompleted
|
|
||||||
? 'success'
|
|
||||||
: 'info'
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
flow: null as null,
|
flow: null as null,
|
||||||
|
|||||||
Reference in New Issue
Block a user