增加用户登出功能

release
Jimmy Liow 2 years ago
parent cdf75c92c3
commit 8b6ba28320

@ -40,6 +40,8 @@ class Auth {
username: json.Result.LoginName,
travelAgencyId: json.Result.LMI_VEI_SN,
travelAgencyName: json.Result.VName,
telephone: json.Result.LkPhone,
emailAddress: json.Result.LMI_listmail,
cityId: json.Result.citysn
}
});
@ -72,6 +74,8 @@ class Auth {
username: 'Vu Xuan Giang',
travelAgencyId: 32531, //30008供应商id对应HT的VEI_SN
travelAgencyName: 'ANP',
telephone: '000',
emailAddress: 'abc@123.com',
cityId: 0
}
}

@ -10,27 +10,18 @@ import { useStore } from "@/stores/StoreContext.js";
const { Header, Content, Footer } = Layout;
const items = [
{
label: (
<Link to="/account/change-password">Change password</Link>
),
label: (<Link to="/account/change-password">Change password</Link>),
key: "0",
},
{
label: (
<Link to="/account/profile">Profile</Link>
),
label: (<Link to="/account/profile">Profile</Link>),
key: "1",
},
{
type: "divider",
},
{
label: (
<a target="_blank" rel="noopener noreferrer" href="#">
Logout
</a>
),
label: (<Link to="/login">Logout</Link>),
key: "3",
},
];
@ -69,7 +60,7 @@ function App() {
<Menu
theme="dark"
mode="horizontal"
defaultSelectedKeys={[href]}
selectedKeys={[href]}
items={[
{ key: "/reservation/newest", label: <Link to="/reservation/newest">Reservation</Link> },
{ key: "/feedback", label: <Link to="/feedback">Feedback</Link> },

@ -1,23 +1,19 @@
import { Descriptions, Space, Form, Col, Row, Typography, App } from 'antd';
import { Descriptions, Col, Row } from 'antd';
import { useStore } from '@/stores/StoreContext.js';
const { Title } = Typography;
function Profile() {
const { authStore } = useStore();
const { notification } = App.useApp();
const { login } = authStore;
return (
<Row>
<Col span={12} offset={6}>
<Descriptions title="User Profile" layout="vertical" column={2}>
<Descriptions.Item label="Username">Bruce Li</Descriptions.Item>
<Descriptions.Item label="Telephone">Tel:029-85360679 Mobile:13991970308/13310981198</Descriptions.Item>
<Descriptions.Item label="Email">lizhi@citsxa.com</Descriptions.Item>
<Descriptions.Item label="Company" span={2}>
XIAN CITS
</Descriptions.Item>
<Descriptions.Item label="Username">{login.username}</Descriptions.Item>
<Descriptions.Item label="Telephone">{login.telephone}</Descriptions.Item>
<Descriptions.Item label="Email address">{login.emailAddress}</Descriptions.Item>
<Descriptions.Item label="Company">{login.travelAgencyName}</Descriptions.Item>
</Descriptions>
</Col>
</Row>

Loading…
Cancel
Save