💥 feat(模块): 赠送会员
This commit is contained in:
@ -298,3 +298,32 @@ export async function deleteCityOperator(id: number) {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
export async function getGiveVipList(
|
||||
params: API.PageParams & Partial<API.GiveVipListItem>,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
const result = await request<API.TableList<API.GiveVipListItem>>(AdminAPI.GIVE_VIP_LIST, {
|
||||
method: 'POST',
|
||||
data: {
|
||||
...transformPageParams(params),
|
||||
...(options || {}),
|
||||
},
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
export async function postGiveVip(options: API.PostGiveVip) {
|
||||
return request<API.GiveVipListItem>(AdminAPI.GIVE_VIP, {
|
||||
method: 'POST',
|
||||
data: {
|
||||
...(options || {}),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export async function getProductList(productType: API.ProductType) {
|
||||
return request<API.ProductSpecListItem[]>(buildUrl(AdminAPI.PRODUCT_LIST, { productType }), {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
39
src/services/typings.d.ts
vendored
39
src/services/typings.d.ts
vendored
@ -380,4 +380,43 @@ declare namespace API {
|
||||
created?: string;
|
||||
updated?: string;
|
||||
}
|
||||
|
||||
type ProductType = 'VIP' | 'BOSSVIP' | 'BOSS_VIP_NEW' | 'GROUP_BATCH_PUSH';
|
||||
|
||||
interface GiveVipListItem {
|
||||
id: number;
|
||||
imOpenId: string;
|
||||
userPhone: string;
|
||||
productType: ProductType;
|
||||
productSpecId: string;
|
||||
giveCount: number;
|
||||
operator: string;
|
||||
createTime: string;
|
||||
updateTime: string;
|
||||
}
|
||||
|
||||
interface PostGiveVip {
|
||||
imOpenId: string;
|
||||
userPhone?: string;
|
||||
productType?: ProductType;
|
||||
productSpecId?: string;
|
||||
giveCount?: number;
|
||||
}
|
||||
|
||||
interface ProductSpecListItem {
|
||||
productId: string;
|
||||
productSpecId: string;
|
||||
productType: ProductType;
|
||||
productName: string;
|
||||
title: string;
|
||||
priceText: string;
|
||||
payPrice: number;
|
||||
showPrice: number;
|
||||
originalPrice: number;
|
||||
badge: string;
|
||||
contentSingle: string;
|
||||
contentsJson: string;
|
||||
sort: number;
|
||||
createTime: string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user