feat: update

This commit is contained in:
chashaobao
2025-10-20 07:58:50 +08:00
parent bc141fcf1b
commit a179654898
32 changed files with 648 additions and 271 deletions

View File

@ -21,8 +21,8 @@ import {
WithdrawRecord,
WithdrawResponse,
} from '@/types/partner';
import { requestUserInfo } from '@/utils/user';
import { buildUrl } from '@/utils/common';
import { requestUserInfo } from '@/utils/user';
export const getInviteCodeFromQuery = (query: Record<string, string>): string | undefined => {
if (query) {
@ -134,7 +134,9 @@ export async function getWithdrawList(data: IPaginationRequest) {
});
}
export async function getLastProfitList() {
const result = await http.get<UserProfitListItem[]>(API.GET_PROFIT_LIST);
const result = await http.get<UserProfitListItem[]>(API.GET_USER_PROFIT_LIST, {
contentType: 'application/x-www-form-urlencoded',
});
return Array.isArray(result) ? result : [];
}
@ -151,6 +153,6 @@ export async function decryptOpenGid(data: DecryptOpenGidBody) {
});
}
export async function getStaffInfo(cityCode: string) {
const result = await http.post<StaffInfo[]>(buildUrl(API.GET_STAFF_CODE, { cityCode }));
const result = await http.get<StaffInfo[]>(buildUrl(API.GET_STAFF_CODE, { cityCode }));
return Array.isArray(result) && result.length ? result[0] : null;
}