61 lines
1.2 KiB
TypeScript
61 lines
1.2 KiB
TypeScript
import request from "@/utils/request";
|
|
const baseURL = "account/admin/shopInfo";
|
|
|
|
const ShopApi = {
|
|
/** 获取店铺列表*/
|
|
getList(params: PageQuery) {
|
|
return request<any, ShopInfoEditDTO[]>({
|
|
url: `${baseURL}`,
|
|
method: "get",
|
|
params: params,
|
|
});
|
|
},
|
|
add(data: ShopInfoEditDTO) {
|
|
return request<any, ShopInfoEditDTO>({
|
|
url: `${baseURL}`,
|
|
method: "post",
|
|
data,
|
|
});
|
|
},
|
|
edit(data: ShopInfoEditDTO) {
|
|
return request<any, ShopInfoEditDTO>({
|
|
url: `${baseURL}`,
|
|
method: "put",
|
|
data,
|
|
});
|
|
},
|
|
};
|
|
|
|
export default ShopApi;
|
|
|
|
/**
|
|
* ShopInfoEditDTO
|
|
*/
|
|
export interface ShopInfoEditDTO {
|
|
accountName?: null | string;
|
|
accountPwd?: null | string;
|
|
activateCode?: null | string;
|
|
address?: null | string;
|
|
chainName?: null | string;
|
|
detail?: null | string;
|
|
frontImg?: null | string;
|
|
id: number | null;
|
|
lat?: null | string;
|
|
lng?: null | string;
|
|
logo?: null | string;
|
|
phone?: null | string;
|
|
profiles?: null | string;
|
|
roleId?: number | null;
|
|
shopName?: null | string;
|
|
shopType?: null | string;
|
|
[property: string]: any;
|
|
}
|
|
|
|
export interface PageQuery {
|
|
page: number;
|
|
shopName?: string;
|
|
size: number;
|
|
status?: number;
|
|
[property: string]: any;
|
|
}
|