fix: 基础功能,图片上传、管理员管理、菜单管理、角色管理
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
This commit is contained in:
89
apps/web-antd/src/views/system/admin/api/index.ts
Normal file
89
apps/web-antd/src/views/system/admin/api/index.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
const prefix = 'admin/';
|
||||
/**
|
||||
* 分页查询用户列表
|
||||
* @param data
|
||||
*/
|
||||
export async function getAdminList(data: any) {
|
||||
return requestClient.get<any>(`${prefix}list`, { params: data });
|
||||
}
|
||||
/**
|
||||
* 分页查询用户列表
|
||||
* @param data
|
||||
*/
|
||||
export async function getAdminAccountBalance(data: any = {}) {
|
||||
return requestClient.get<any>(`${prefix}my-balance`, { params: data });
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取管理员详情
|
||||
* @param id
|
||||
*/
|
||||
export async function getAdminInfo(id: number) {
|
||||
return requestClient.get<any>(`${prefix}detail`, { params: { id } });
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增管理员
|
||||
* @param data
|
||||
*/
|
||||
export async function createAdmin(data: Record<string, any>) {
|
||||
return requestClient.post<any>(`${prefix}create`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑管理员
|
||||
* @param data
|
||||
*/
|
||||
export async function updateAdmin(data: Record<string, any>) {
|
||||
return requestClient.post<any>(`${prefix}update`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除管理员
|
||||
* @param data
|
||||
*/
|
||||
export async function deleteAdmin(data: Record<string, any>) {
|
||||
return requestClient.post<any>(`${prefix}delete`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
* @param data
|
||||
*/
|
||||
export async function updatePassword(data: Record<string, any>) {
|
||||
return requestClient.post<any>(`${prefix}update-password`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除管理员
|
||||
* @param id
|
||||
*/
|
||||
export async function resetPassword(id: number) {
|
||||
return requestClient.post<any>(`${prefix}reset-password`, {
|
||||
id,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取我绑定的银行卡
|
||||
*/
|
||||
export async function getMyCard() {
|
||||
return requestClient.get<any>(`${prefix}my-card`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取我绑定的银行卡
|
||||
*/
|
||||
export async function getQuickMenuApi() {
|
||||
return requestClient.get<any>(`${prefix}get-quick-menu`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑账户绑定银行卡
|
||||
* @param data
|
||||
*/
|
||||
export async function saveCard(data: Record<string, any>) {
|
||||
return requestClient.post<any>(`${prefix}save-card`, data);
|
||||
}
|
||||
Reference in New Issue
Block a user