mirror of
https://github.com/whyour/qinglong.git
synced 2026-06-30 20:35:09 +08:00
增加登录设备展示
This commit is contained in:
@@ -77,7 +77,14 @@ const Login = () => {
|
||||
|
||||
const checkResponse = (data: any) => {
|
||||
if (data.code === 200) {
|
||||
const { token, lastip, lastaddr, lastlogon, retries = 0 } = data.data;
|
||||
const {
|
||||
token,
|
||||
lastip,
|
||||
lastaddr,
|
||||
lastlogon,
|
||||
retries = 0,
|
||||
platform,
|
||||
} = data.data;
|
||||
localStorage.setItem(config.authKey, token);
|
||||
notification.success({
|
||||
message: '登录成功!',
|
||||
@@ -89,6 +96,7 @@ const Login = () => {
|
||||
</div>
|
||||
<div>上次登录地点:{lastaddr || '-'}</div>
|
||||
<div>上次登录IP:{lastip || '-'}</div>
|
||||
<div>上次登录设备:{platform || '-'}</div>
|
||||
<div>上次登录状态:{retries > 0 ? `失败${retries}次` : '成功'}</div>
|
||||
</>
|
||||
),
|
||||
|
||||
@@ -45,6 +45,12 @@ const columns = [
|
||||
key: 'ip',
|
||||
align: 'center' as const,
|
||||
},
|
||||
{
|
||||
title: '登陆设备',
|
||||
dataIndex: 'platform',
|
||||
key: 'platform',
|
||||
align: 'center' as const,
|
||||
},
|
||||
{
|
||||
title: '登陆状态',
|
||||
dataIndex: 'status',
|
||||
|
||||
Reference in New Issue
Block a user