You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

63 lines
1.2 KiB

import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { UserLabelVO, UserLabelForm, UserLabelQuery } from '@/api/im/userLabel/types';
/**
* 查询用户分组列表
* @param query
* @returns {*}
*/
export const listUserLabel = (query?: UserLabelQuery): AxiosPromise<UserLabelVO[]> => {
return request({
url: '/im/userLabel/list',
method: 'get',
params: query
});
};
/**
* 查询用户分组详细
* @param id
*/
export const getUserLabel = (id: string | number): AxiosPromise<UserLabelVO> => {
return request({
url: '/im/userLabel/' + id,
method: 'get'
});
};
/**
* 新增用户分组
* @param data
*/
export const addUserLabel = (data: UserLabelForm) => {
return request({
url: '/im/userLabel',
method: 'post',
data: data
});
};
/**
* 修改用户分组
* @param data
*/
export const updateUserLabel = (data: UserLabelForm) => {
return request({
url: '/im/userLabel',
method: 'put',
data: data
});
};
/**
* 删除用户分组
* @param id
*/
export const delUserLabel = (id: string | number | Array<string | number>) => {
return request({
url: '/im/userLabel/' + id,
method: 'delete'
});
};