feat: add admin web MVP

This commit is contained in:
王鹏
2026-07-07 16:18:23 +08:00
parent fa8f243486
commit bb325151d6
30 changed files with 4029 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import type { SecondGoods } from '../types'
import { apiGet, apiPut } from './http'
export function listSecondGoods(status?: string) {
return apiGet<SecondGoods[]>('/api/admin/second-goods', status ? { status } : undefined)
}
export function approveSecondGoods(id: number) {
return apiPut<SecondGoods>(`/api/admin/second-goods/${id}/approve`)
}
export function rejectSecondGoods(id: number, reason: string) {
return apiPut<SecondGoods>(`/api/admin/second-goods/${id}/reject`, { reason })
}
export function offShelfSecondGoods(id: number) {
return apiPut<SecondGoods>(`/api/admin/second-goods/${id}/off-shelf`)
}