删除不需要的页面

release
Jimmy Liow 2 years ago
parent 03febbbc45
commit 6dd8996727

@ -11,13 +11,10 @@ import "@/assets/global.css";
import App from "@/views/App";
import Standlone from "@/views/Standlone";
import Login from "@/views/Login";
import SignOut from "@/views/SignOut";
import Index from "@/views/index";
import ErrorPage from "@/views/error-page";
import ReservationNewest from "@/views/reservation/Newest";
import ReservationDetail from "@/views/reservation/Detail";
import ReservationPrint from "@/views/reservation/Print";
import ReservationNameCard from "@/views/reservation/NameCard";
import ChangePassword from "@/views/account/ChangePassword";
import AccountProfile from "@/views/account/Profile";
import FeedbackIndex from "@/views/feedback/Index";
@ -46,8 +43,6 @@ const router = createBrowserRouter([
{ index: true, element: <Index /> },
{ path: "reservation/newest", element: <ReservationNewest />},
{ path: "reservation/:reservationId", element: <ReservationDetail />},
{ path: "reservation/:reservationId/print", element: <ReservationPrint />},
{ path: "reservation/:reservationId/name-card", element: <ReservationNameCard />},
{ path: "account/change-password", element: <ChangePassword />},
{ path: "account/profile", element: <AccountProfile />},
{ path: "feedback", element: <FeedbackIndex />},
@ -62,7 +57,6 @@ const router = createBrowserRouter([
element: <Standlone />,
children: [
{ path: "/login", element: <Login /> },
{ path: "/sign-out", element: <SignOut /> }
]
}
]);

@ -40,8 +40,7 @@ function App() {
const loginToken = login.token;
const navigate = useNavigate();
useEffect(() => {
// Check location
console.info("href: " + href + '; login.token: ' + loginToken + '; timeout: ' + login.timeout);
// console.info("href: " + href + '; login.token: ' + loginToken + '; timeout: ' + login.timeout);
if (href !== '/login' && isEmpty(loginToken)) {
navigate('/login');
}

@ -1,42 +0,0 @@
import { Button, Checkbox, Form, Input, Row, Typography, Layout } from 'antd';
const { Header, Footer, Sider, Content } = Layout;
const { Title } = Typography;
const headerStyle = {
textAlign: 'center',
// color: '#fff',
height: 64,
paddingInline: 50,
lineHeight: '64px',
backgroundColor: '#f5f5f5',
};
const contentStyle = {
textAlign: 'center',
minHeight: 600,
lineHeight: '120px',
// color: '#fff',
// backgroundColor: '#108ee9',
};
const footerStyle = {
textAlign: 'center',
// color: '#fff',
// backgroundColor: '#7dbcea',
};
const onFinish = (values) => {
console.log('Success:', values);
};
const onFinishFailed = (errorInfo) => {
console.log('Failed:', errorInfo);
};
const SignOut = () => (
<Layout>
<Header style={headerStyle}>
<Title>Global Highlights Hub</Title>
</Header>
<Content style={contentStyle}>
See you.
</Content>
<Footer style={footerStyle}>Footer</Footer>
</Layout>
);
export default SignOut;

@ -54,9 +54,9 @@ function Detail() {
'https://view.officeapps.live.com/op/embed.aspx?wdPrint=1&wdHideGridlines=0&wdHideComments=1&wdEmbedCode=0&src=';
// https://www.chinahighlights.com/public/reservationW220420009.doc
const reservationUrl =
`https://p9axztuwd7x8a7.mycht.cn/service-fileServer/DownloadPlanDoc?GRI_SN=${reservationId}&VEI_SN=${login.travelAgencyId}&FileType=1&Test=1`;
`https://p9axztuwd7x8a7.mycht.cn/service-fileServer/DownloadPlanDoc?GRI_SN=${reservationId}&VEI_SN=${login.travelAgencyId}&FileType=1`;
const nameCardUrl =
`https://p9axztuwd7x8a7.mycht.cn/service-fileServer/DownloadPlanDoc?GRI_SN=${reservationId}&VEI_SN=${login.travelAgencyId}&FileType=2&Test=1`;
`https://p9axztuwd7x8a7.mycht.cn/service-fileServer/DownloadPlanDoc?GRI_SN=${reservationId}&VEI_SN=${login.travelAgencyId}&FileType=2`;
const reservationPreviewUrl = officeWebViewerUrl + encodeURIComponent(reservationUrl);
const nameCardPreviewUrl = officeWebViewerUrl + encodeURIComponent(nameCardUrl);

@ -1,29 +0,0 @@
import { observer } from "mobx-react";
import { Row, Col, Space, Table, Typography, List, Watermark } from 'antd';
import DocViewer, { DocViewerRenderers } from "@cyntler/react-doc-viewer";
import { useStore } from '@/stores/StoreContext.js';
const { Title } = Typography;
function NameCard() {
const { reservationStore } = useStore();
const docs = [{ uri: "https://www.chinahighlights.com/public/NameCard.doc" }];
return (
<Watermark content={['Global Highlights', 'Discovery Your Way!']}>
<DocViewer
config={{
header: {
disableHeader: true,
disableFileName: false,
retainURLParams: false,
},
}}
documents={docs}
pluginRenderers={DocViewerRenderers}
style={{ height: 750 }} />
</Watermark>
);
}
export default observer(NameCard);

@ -1,28 +0,0 @@
import { useParams, useNavigate } from "react-router-dom";
import { useEffect } from "react";
import { observer } from "mobx-react";
import { toJS } from "mobx";
import { Row, Col, Space, Table, Typography, List, Watermark } from "antd";
import DocViewer, { DocViewerRenderers } from "@cyntler/react-doc-viewer";
import { useStore } from "../../stores/StoreContext.js";
function Print() {
const navigate = useNavigate();
const { reservationId } = useParams();
const docs = [{ uri: "https://www.chinahighlights.com/public/reservationW220420009.doc" }, { uri: "https://www.chinahighlights.com/public/NameCard.doc" }];
useEffect(() => {
console.info("Detail.useEffect: " + reservationId);
}, [reservationId]);
return (
<Watermark content={["Global Highlights", "Discovery Your Way!"]}>
<DocViewer
documents={docs}
pluginRenderers={DocViewerRenderers}
style={{ height: 750 }} />
</Watermark>
);
}
export default observer(Print);
Loading…
Cancel
Save