增加用户登出功能

release
Jimmy Liow 2 years ago
parent cdf75c92c3
commit 8b6ba28320

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

@ -10,27 +10,18 @@ import { useStore } from "@/stores/StoreContext.js";
const { Header, Content, Footer } = Layout; const { Header, Content, Footer } = Layout;
const items = [ const items = [
{ {
label: ( label: (<Link to="/account/change-password">Change password</Link>),
<Link to="/account/change-password">Change password</Link>
),
key: "0", key: "0",
}, },
{ {
label: ( label: (<Link to="/account/profile">Profile</Link>),
<Link to="/account/profile">Profile</Link>
),
key: "1", key: "1",
}, },
{ {
type: "divider", type: "divider",
}, },
{ {
label: ( label: (<Link to="/login">Logout</Link>),
<a target="_blank" rel="noopener noreferrer" href="#">
Logout
</a>
),
key: "3", key: "3",
}, },
]; ];
@ -69,7 +60,7 @@ function App() {
<Menu <Menu
theme="dark" theme="dark"
mode="horizontal" mode="horizontal"
defaultSelectedKeys={[href]} selectedKeys={[href]}
items={[ items={[
{ key: "/reservation/newest", label: <Link to="/reservation/newest">Reservation</Link> }, { key: "/reservation/newest", label: <Link to="/reservation/newest">Reservation</Link> },
{ key: "/feedback", label: <Link to="/feedback">Feedback</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'; import { useStore } from '@/stores/StoreContext.js';
const { Title } = Typography;
function Profile() { function Profile() {
const { authStore } = useStore(); const { authStore } = useStore();
const { notification } = App.useApp(); const { login } = authStore;
return ( return (
<Row> <Row>
<Col span={12} offset={6}> <Col span={12} offset={6}>
<Descriptions title="User Profile" layout="vertical" column={2}> <Descriptions title="User Profile" layout="vertical" column={2}>
<Descriptions.Item label="Username">Bruce Li</Descriptions.Item> <Descriptions.Item label="Username">{login.username}</Descriptions.Item>
<Descriptions.Item label="Telephone">Tel:029-85360679 Mobile:13991970308/13310981198</Descriptions.Item> <Descriptions.Item label="Telephone">{login.telephone}</Descriptions.Item>
<Descriptions.Item label="Email">lizhi@citsxa.com</Descriptions.Item> <Descriptions.Item label="Email address">{login.emailAddress}</Descriptions.Item>
<Descriptions.Item label="Company" span={2}> <Descriptions.Item label="Company">{login.travelAgencyName}</Descriptions.Item>
XIAN CITS
</Descriptions.Item>
</Descriptions> </Descriptions>
</Col> </Col>
</Row> </Row>

Loading…
Cancel
Save