web-课程任务
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import { api } from '@/apis/index';
|
||||
import type { SysUser, SysUserInfo, UserVO, UserDeptRoleVO, SysUserDeptRole, ResultDomain } from '@/types';
|
||||
import type { SysUser, SysUserInfo, UserVO, UserDeptRoleVO, SysUserDeptRole, ResultDomain, PageParam } from '@/types';
|
||||
import { useStore } from 'vuex';
|
||||
|
||||
const store = useStore();
|
||||
@@ -48,6 +48,31 @@ export const userApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取用户分页列表
|
||||
* @param pageParam 分页参数
|
||||
* @param filter 过滤条件
|
||||
* @returns Promise<ResultDomain<UserVO>>
|
||||
*/
|
||||
async getUserPage(pageParam: PageParam, filter?: any): Promise<ResultDomain<UserVO>> {
|
||||
const response = await api.post<UserVO>('/users/page', {
|
||||
pageParam,
|
||||
filter
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取用户分页列表
|
||||
* @param pageParam 分页参数
|
||||
* @param filter 过滤条件
|
||||
* @returns Promise<ResultDomain<SysUser>>
|
||||
*/
|
||||
async getUserPage(pageParam: PageParam, filter: SysUser): Promise<ResultDomain<SysUser>> {
|
||||
const response = await api.post<SysUser>('/users/page', { pageParam, filter });
|
||||
return response.data;
|
||||
},
|
||||
|
||||
/**
|
||||
* 创建用户
|
||||
* @param user 用户信息
|
||||
|
||||
Reference in New Issue
Block a user