mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-10 02:57:12 +08:00
feat: 新增在线用户管理
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
export * from './area'
|
||||
export * from './auth'
|
||||
export * from './common'
|
||||
export * from './monitor'
|
||||
|
||||
export * from './area/type'
|
||||
export * from './auth/type'
|
||||
export * from './common/type'
|
||||
export * from './monitor/type'
|
||||
|
||||
|
||||
1
src/apis/monitor/index.ts
Normal file
1
src/apis/monitor/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from './online'
|
||||
14
src/apis/monitor/online.ts
Normal file
14
src/apis/monitor/online.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import http from '@/utils/http'
|
||||
import type * as Monitor from './type'
|
||||
|
||||
const BASE_URL = '/monitor/online/user'
|
||||
|
||||
/** @desc 查询在线用户列表 */
|
||||
export function listOnlineUser(query: Monitor.OnlineUserQuery) {
|
||||
return http.get<PageRes<Monitor.OnlineUserResp[]>>(`${BASE_URL}`, query)
|
||||
}
|
||||
|
||||
/** @desc 强退在线用户 */
|
||||
export function kickout(token: string) {
|
||||
return http.del(`${BASE_URL}/${token}`)
|
||||
}
|
||||
20
src/apis/monitor/type.ts
Normal file
20
src/apis/monitor/type.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/** 在线用户类型 */
|
||||
export interface OnlineUserResp {
|
||||
id: string
|
||||
description: string
|
||||
module: string
|
||||
timeTaken: number
|
||||
ip: string
|
||||
address: string
|
||||
browser: string
|
||||
os: string
|
||||
status: number
|
||||
errorMsg: string
|
||||
createUserString: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
export interface OnlineUserQuery extends PageQuery {
|
||||
nickname?: string
|
||||
loginTime?: string
|
||||
}
|
||||
Reference in New Issue
Block a user