This commit is contained in:
@@ -1,16 +1,27 @@
|
||||
import { get } from '@/utils/request'
|
||||
import { get } from '@/utils/request';
|
||||
|
||||
export interface ShopCascadeParams {
|
||||
parent_id?: number
|
||||
shop_name?: string
|
||||
parent_id?: number;
|
||||
shop_name?: string;
|
||||
}
|
||||
|
||||
export interface ShopCascadeItem {
|
||||
id: number
|
||||
shop_name: string
|
||||
has_children: boolean
|
||||
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 })
|
||||
return get<ShopCascadeItem[]>('/api/admin/shops/cascade', { params });
|
||||
}
|
||||
|
||||
export function getShopDetail(shopId: number) {
|
||||
return get<ShopDetail>(`/api/admin/shops/${shopId}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user