修复后台”在线用户强退“功能
This commit is contained in:
parent
2989372c5c
commit
e81f8c51cb
@ -23,6 +23,6 @@ export const getAccessTokenPageApi = (params: OAuth2TokenPageReqVO) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 删除 token
|
// 删除 token
|
||||||
export const deleteAccessTokenApi = (accessToken: number) => {
|
export const deleteAccessTokenApi = (accessToken: string) => {
|
||||||
return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
|
return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
preIcon="ep:delete"
|
preIcon="ep:delete"
|
||||||
:title="t('action.logout')"
|
:title="t('action.logout')"
|
||||||
v-hasPermi="['system:oauth2-token:delete']"
|
v-hasPermi="['system:oauth2-token:delete']"
|
||||||
@click="handleForceLogout(row.id)"
|
@click="handleForceLogout(row.accessToken)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</XTable>
|
</XTable>
|
||||||
@ -49,11 +49,11 @@ const handleDetail = async (row: TokenApi.OAuth2TokenVO) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 强退操作
|
// 强退操作
|
||||||
const handleForceLogout = (rowId: number) => {
|
const handleForceLogout = (accessToken: string) => {
|
||||||
message
|
message
|
||||||
.confirm('是否要强制退出用户')
|
.confirm('是否要强制退出用户')
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await TokenApi.deleteAccessTokenApi(rowId)
|
await TokenApi.deleteAccessTokenApi(accessToken)
|
||||||
message.success(t('common.success'))
|
message.success(t('common.success'))
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user