feat: invite capa page

This commit is contained in:
魔力叉烧包
2025-06-05 23:32:04 +08:00
parent 6805b590c7
commit 082c5483c5
3 changed files with 47 additions and 11 deletions

View File

@ -5,6 +5,7 @@ import http from '@/http';
import { API } from '@/http/api';
import store from '@/store';
import { setInviteCode } from '@/store/actions/partner';
import { IPaginationRequest } from '@/types/common';
import {
GetProfitRequest,
InviteUserInfo,
@ -51,8 +52,11 @@ export const getPartnerQrcode = async () => {
export const getPartnerProfitStat = async () => {
return await http.post<PartnerProfitsState>(API.GET_PROFIT_STAT);
};
export const getPartnerInviteList = async () => {
return await http.post<InviteUserInfo[]>(API.GET_INVITE_LIST);
export const getPartnerInviteList = async (data: IPaginationRequest) => {
return await http.post<{ content: InviteUserInfo[]; totalPages: number }>(API.GET_INVITE_LIST, {
data,
contentType: 'application/x-www-form-urlencoded',
});
};
export const dispatchUpdateInviteCode = (code: string) => store.dispatch(setInviteCode(code));
export const getInviteCode = async () => {