Files
tyc-admin/apps/web-antd/src/api/platform-user/index.ts
liangzai d3609c21c0
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
CodeQL / Analyze (${{ matrix.language }}) (none, 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
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
init: 项目初始化提交
2025-05-27 18:35:06 +08:00

54 lines
1.1 KiB
TypeScript

import type { Recordable } from '@vben/types';
import { requestClient } from '#/api/request';
export namespace PlatformUserApi {
export interface PlatformUserItem {
id: number;
mobile: string;
nickname: string;
info: string;
inside: number;
create_time: string;
update_time: string;
}
export interface PlatformUserList {
total: number;
items: PlatformUserItem[];
}
export interface UpdatePlatformUserRequest {
mobile: string;
nickname: string;
info: string;
inside: number;
}
}
/**
* 获取平台用户列表数据
*/
async function getPlatformUserList(params: Recordable<any>) {
return requestClient.get<PlatformUserApi.PlatformUserList>(
'/platform_user/list',
{
params,
},
);
}
/**
* 更新平台用户
* @param id 用户 ID
* @param data 用户数据
*/
async function updatePlatformUser(
id: number,
data: PlatformUserApi.UpdatePlatformUserRequest,
) {
return requestClient.put(`/platform_user/update/${id}`, data);
}
export { getPlatformUserList, updatePlatformUser };