增加线下提号店铺管理
This commit is contained in:
@@ -14,6 +14,7 @@ export interface AdminPickup {
|
||||
owner_phone: string
|
||||
admin_id: number
|
||||
platform: string
|
||||
shop_name: string
|
||||
listing_price_cent: number
|
||||
owner_price_cent: number
|
||||
website_profit_cent: number
|
||||
@@ -52,6 +53,7 @@ export interface AvailableListing {
|
||||
export interface AdminPickupCreateRequest {
|
||||
listing_id: number
|
||||
platform?: string
|
||||
shop_name?: string
|
||||
profit_amount_cent?: number
|
||||
remark?: string
|
||||
}
|
||||
@@ -72,6 +74,7 @@ export interface AdminPickupListQuery {
|
||||
page_size?: number
|
||||
keyword?: string
|
||||
status?: string
|
||||
shop_name?: string
|
||||
}
|
||||
|
||||
function cleanParams(query: object) {
|
||||
@@ -99,6 +102,13 @@ export async function fetchAdminPickup(id: string | number) {
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function fetchAdminPickupShopOptions(platform = '') {
|
||||
const { data } = await apiClient.get<ApiResponse<string[]>>('/admin/pickups/shop-options', {
|
||||
params: cleanParams({ platform }),
|
||||
})
|
||||
return Array.isArray(data.data) ? data.data : []
|
||||
}
|
||||
|
||||
export async function fetchAvailableListings(keyword: string, page = 1, page_size = 20) {
|
||||
const { data } = await apiClient.get<ApiResponse<PaginatedResult<AvailableListing>>>(
|
||||
'/admin/pickups/available-listings',
|
||||
|
||||
Reference in New Issue
Block a user