28 lines
591 B
TypeScript
28 lines
591 B
TypeScript
import { get } from '@/utils/request';
|
|
|
|
export interface ShopCascadeParams {
|
|
parent_id?: number;
|
|
shop_name?: string;
|
|
}
|
|
|
|
export interface ShopCascadeItem {
|
|
id: number;
|
|
shop_name: string;
|
|
has_children: boolean;
|
|
}
|
|
|
|
export interface ShopDetail {
|
|
id: number;
|
|
shop_name: string;
|
|
shop_code: string;
|
|
distribution_code?: string | null;
|
|
}
|
|
|
|
export function getShopCascade(params?: ShopCascadeParams) {
|
|
return get<ShopCascadeItem[]>('/api/admin/shops/cascade', { params });
|
|
}
|
|
|
|
export function getShopDetail(shopId: number) {
|
|
return get<ShopDetail>(`/api/admin/shops/${shopId}`);
|
|
}
|