修复后台”在线用户强退“功能

This commit is contained in:
cxr01 2023-05-14 13:46:09 +08:00
parent 7a64bbdea0
commit a788921d51
2 changed files with 4 additions and 4 deletions

View File

@ -17,6 +17,6 @@ export const getAccessTokenPage = (params: PageParam) => {
}
// 删除 token
export const deleteAccessToken = (accessToken: number) => {
export const deleteAccessToken = (accessToken: string) => {
return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
}

View File

@ -80,7 +80,7 @@
<el-button
link
type="danger"
@click="handleForceLogout(scope.row.id)"
@click="handleForceLogout(scope.row.accessToken)"
v-hasPermi="['system:oauth2-token:delete']"
>
强退
@ -142,12 +142,12 @@ const resetQuery = () => {
}
/** 强制退出操作 */
const handleForceLogout = async (id: number) => {
const handleForceLogout = async (accessToken: string) => {
try {
//
await message.confirm('是否要强制退出用户')
//
await OAuth2AccessTokenApi.deleteAccessToken(id)
await OAuth2AccessTokenApi.deleteAccessToken(accessToken)
message.success(t('common.success'))
//
await getList()