2025-07-21 11:16:16 +08:00
|
|
|
import request from '@/utils/http'
|
|
|
|
|
|
|
|
|
|
export class UserService {
|
|
|
|
|
//获取公司
|
|
|
|
|
static getCompanyList() {
|
|
|
|
|
return request.get<Api.Brand.BrandInfo>({
|
|
|
|
|
url: '/common/preset/corps'
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-08-15 16:37:41 +08:00
|
|
|
//获取系统
|
|
|
|
|
static getsystemsList() {
|
|
|
|
|
return request.get<Api.Brand.BrandInfo>({
|
|
|
|
|
url: '/common/preset/systems'
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-07-21 11:16:16 +08:00
|
|
|
//注册
|
|
|
|
|
static register(params: any) {
|
|
|
|
|
return request.post<Api.Auth.registerResponse>({
|
|
|
|
|
url: '/common/auth/register',
|
|
|
|
|
params
|
|
|
|
|
// showErrorMessage: false // 不显示错误消息
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//获取 飞书信息
|
2025-08-15 16:37:41 +08:00
|
|
|
static getfeishuAppList(params: any) {
|
2025-07-21 11:16:16 +08:00
|
|
|
return request.get<Api.Brand.BrandInfo>({
|
|
|
|
|
url: '/common/preset/feishu/app',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 登录
|
|
|
|
|
static login(params: Api.Auth.LoginParams) {
|
|
|
|
|
return request.post<Api.Auth.LoginResponse>({
|
|
|
|
|
url: '/common/auth/login',
|
|
|
|
|
params
|
|
|
|
|
// showErrorMessage: false // 不显示错误消息
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 刷新token
|
|
|
|
|
static refreshToken(params: { refresh_token: string }) {
|
|
|
|
|
return request.post<any>({
|
|
|
|
|
url: '/common/auth/refresh/token',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-08-15 16:37:41 +08:00
|
|
|
//飞书凭证
|
2025-07-21 11:16:16 +08:00
|
|
|
static getfeishuscope() {
|
|
|
|
|
return request.get<Api.Auth.Authfeishuscope>({
|
|
|
|
|
url: '/common/auth/feishu/scope'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取用户信息
|
|
|
|
|
static getUserInfo() {
|
|
|
|
|
return request.get<Api.User.UserInfo>({
|
|
|
|
|
url: '/common/user/info'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取用户列表
|
|
|
|
|
static getUserList(params: Api.Common.PaginatingParams) {
|
|
|
|
|
return request.get<Api.User.UserListData>({
|
|
|
|
|
url: '/api/user/list',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//角色 列表
|
|
|
|
|
static getRoleList(params: Api.Common.PaginatingParams) {
|
|
|
|
|
return request.get<Api.Role.RoleListData>({
|
|
|
|
|
url: '/admin/role/list',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-08-15 16:37:41 +08:00
|
|
|
//获取菜单
|
|
|
|
|
static getMenuList() {
|
|
|
|
|
return request.get<Api.User.UserInfo>({
|
|
|
|
|
url: '/common/preset/menus'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//个人信息编辑
|
|
|
|
|
static editUserInfo(params: any) {
|
|
|
|
|
return request.post<Api.Work.AddResponse>({
|
|
|
|
|
url: '/admin/user/edit',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-09-18 10:57:17 +08:00
|
|
|
//离职分配
|
|
|
|
|
static leaveUser(params: any) {
|
|
|
|
|
return request.get<Api.Work.AddResponse>({
|
|
|
|
|
url: '/admin/crm/customer/allocation',
|
|
|
|
|
params
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//客户删除
|
|
|
|
|
static crmCustomerDelete(params: any) {
|
|
|
|
|
return request.get<Api.Common.AddResponse>({
|
|
|
|
|
url: '/admin/crm/customer/delete',
|
|
|
|
|
params
|
|
|
|
|
// showErrorMessage: false // 不显示错误消息
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-07-21 11:16:16 +08:00
|
|
|
}
|