feat: 分销码
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 2m22s

This commit is contained in:
luo
2026-10-08 11:00:51 +08:00
parent 65d4c7bcf8
commit 2b4fd6fff8
12 changed files with 255 additions and 11 deletions

View File

@@ -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}`);
}