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

Merge pull request !151 from cxr/master
pull/152/head^2
芋道源码 2023-05-15 14:47:49 +00:00 committed by Gitee
commit fa618ca44a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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()