feat(product-center): implement Figma-designed UI, upload module, and website tests

- Redesign website homepage & product-center per Figma (fonts, logos, hero/footer/customer cases)
- Add API upload module (multer) with static serving for uploads/public assets
- Add OriginGood.delisted flag and SDS request retry logic
- Add admin ImageUpload component and goods import/upload flows
- Add vitest suite for website components and composables (32 tests)
- Add skills, docs, plans and PRODUCT.md
This commit is contained in:
yeuimu
2026-08-20 14:32:03 +08:00
parent b5fc88f3fa
commit 79fabd85f7
107 changed files with 5364 additions and 2601 deletions
+4 -4
View File
@@ -4,7 +4,7 @@ import type {
CreateGoodRequest,
UpdateGoodRequest,
BatchCreateGoodsRequest,
UpdatePriorityRequest,
BatchPriorityRequest,
GoodsFilter,
PaginatedResult,
} from '@/types'
@@ -40,8 +40,8 @@ export const goodsApi = {
return request.post<any, Good[]>('/goods/batch', data)
},
// Update priority
updatePriority: (data: UpdatePriorityRequest) => {
return request.patch<any, Good[]>('/goods/priority', data)
// Batch update priority
batchUpdatePriority: (data: BatchPriorityRequest) => {
return request.patch<any, { count: number }>('/goods/batch-priority', data)
},
}
+5 -1
View File
@@ -3,7 +3,11 @@ import type { SyncLog } from '@/types'
export const syncApi = {
syncProducts: () => {
return request.post<any, SyncLog>('/sync/products')
return request.post<any, { message: string }>('/sync/products')
},
syncCategories: () => {
return request.post<any, { message: string }>('/sync/categories')
},
getSyncStatus: (limit?: number) => {
+14
View File
@@ -0,0 +1,14 @@
import request from './request'
export interface UploadResult {
url: string
filename: string
}
export const uploadApi = {
uploadImage: (file: File) => {
const formData = new FormData()
formData.append('file', file)
return request.post<any, UploadResult>('/upload/image', formData)
},
}