💥 feat(模块): 赠送会员

This commit is contained in:
chashaobao
2025-12-30 00:40:25 +08:00
parent 447934d5ff
commit 31cb15235a
5 changed files with 263 additions and 0 deletions

View File

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

View File

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