Merge branch 'trunk' into feat/update-login

This commit is contained in:
chashaobao
2025-06-15 01:09:35 +08:00
15 changed files with 312 additions and 36 deletions

View File

@ -10,8 +10,11 @@ import {
GetProfitRequest,
InviteUserInfo,
PartnerInviteCode,
PartnerPagination,
PartnerProfitItem,
PartnerProfitsState,
WithdrawRecord,
WithdrawResponse,
} from '@/types/partner';
import { requestUserInfo } from '@/utils/user';
@ -53,7 +56,7 @@ export const getPartnerProfitStat = async () => {
return await http.post<PartnerProfitsState>(API.GET_PROFIT_STAT);
};
export const getPartnerInviteList = async (data: IPaginationRequest) => {
return await http.post<{ content: InviteUserInfo[]; totalPages: number }>(API.GET_INVITE_LIST, {
return await http.post<PartnerPagination<InviteUserInfo>>(API.GET_INVITE_LIST, {
data,
contentType: 'application/x-www-form-urlencoded',
});
@ -113,3 +116,14 @@ export function formatUserId(input: string): string {
// 拼接结果
return beforeMask + maskedPart + afterMask;
}
export async function withdrawMoney() {
return await http.post<WithdrawResponse>(API.WITHDRAW);
}
export async function getWithdrawList(data: IPaginationRequest) {
return await http.post<PartnerPagination<WithdrawRecord>>(API.GET_WITHDRAW_LIST, {
data,
contentType: 'application/x-www-form-urlencoded',
});
}