补充个人中心下的页面
This commit is contained in:
44
src/api/user.ts
Normal file
44
src/api/user.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import type { ApiResponse } from "@/lib/api"
|
||||
import type { UserItem, UserQueryParams } from "@/lib/models/user"
|
||||
import { callByUser } from "./base"
|
||||
|
||||
// ==================== 用户管理(.NET /api/baseinfo/v1/user/*) ====================
|
||||
|
||||
export async function fetchUserPage(
|
||||
params: UserQueryParams,
|
||||
): Promise<ApiResponse<UserItem[]>> {
|
||||
return await callByUser<UserItem[]>(
|
||||
"/api/baseinfo/v1/user/Page",
|
||||
params,
|
||||
"GET",
|
||||
)
|
||||
}
|
||||
|
||||
export async function fetchUserSearch(
|
||||
params: UserQueryParams,
|
||||
): Promise<ApiResponse<UserItem[]>> {
|
||||
return await callByUser<UserItem[]>(
|
||||
"/api/baseinfo/v1/user/Search",
|
||||
params,
|
||||
"GET",
|
||||
)
|
||||
}
|
||||
|
||||
export async function fetchAmountDetails(
|
||||
params: Record<string, unknown>,
|
||||
): Promise<ApiResponse<Record<string, unknown>>> {
|
||||
return await callByUser<Record<string, unknown>>(
|
||||
"/api/baseinfo/v1/user/AmountDetails",
|
||||
params,
|
||||
"GET",
|
||||
)
|
||||
}
|
||||
|
||||
export async function updateUserProfile(
|
||||
data: Record<string, unknown>,
|
||||
): Promise<ApiResponse<undefined>> {
|
||||
return await callByUser<undefined>(
|
||||
"/api/baseinfo/v1/user/UpdateProfile",
|
||||
data,
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user