error pages
This commit is contained in:
parent
d1f31053ca
commit
d43c85c45b
55
pages/404.js
Normal file
55
pages/404.js
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
import React from "react";
|
||||||
|
import Head from "next/head";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
|
import Footer from "./components/Footer";
|
||||||
|
import MainHeader from "./components/MainHeader";
|
||||||
|
|
||||||
|
class Page500 extends React.Component
|
||||||
|
{
|
||||||
|
constructor(props)
|
||||||
|
{
|
||||||
|
super(props);
|
||||||
|
this.state = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
static getDerivedStateFromProps(nextProps, prevState)
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {}
|
||||||
|
|
||||||
|
render()
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<Head>
|
||||||
|
<title>ЛК Эволюция автолизинга</title>
|
||||||
|
<meta name="description" content="ЛК Эволюция автолизинга" />
|
||||||
|
</Head>
|
||||||
|
<MainHeader/>
|
||||||
|
<main>
|
||||||
|
<section>
|
||||||
|
<div className="clear"></div>
|
||||||
|
<div className="container">
|
||||||
|
<div className="title_wrapper">
|
||||||
|
<div className="left">
|
||||||
|
<h1 className="section_title">Страница не найдена</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="offline">
|
||||||
|
<p>
|
||||||
|
К сожалению запрошенная страница не существует.<br/><br/><Link href="/"><a style={{ textDecoration: "underline" }}>Вернуться в Личный кабинет</a></Link>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
<Footer/>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Page500;
|
||||||
55
pages/_error.js
Normal file
55
pages/_error.js
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
import React from "react";
|
||||||
|
import Head from "next/head";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
|
import Footer from "./components/Footer";
|
||||||
|
import MainHeader from "./components/MainHeader";
|
||||||
|
|
||||||
|
class ErrorPage extends React.Component
|
||||||
|
{
|
||||||
|
constructor(props)
|
||||||
|
{
|
||||||
|
super(props);
|
||||||
|
this.state = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
static getDerivedStateFromProps(nextProps, prevState)
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {}
|
||||||
|
|
||||||
|
render()
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<Head>
|
||||||
|
<title>ЛК Эволюция автолизинга</title>
|
||||||
|
<meta name="description" content="ЛК Эволюция автолизинга" />
|
||||||
|
</Head>
|
||||||
|
<MainHeader/>
|
||||||
|
<main>
|
||||||
|
<section>
|
||||||
|
<div className="clear"></div>
|
||||||
|
<div className="container">
|
||||||
|
<div className="title_wrapper">
|
||||||
|
<div className="left">
|
||||||
|
<h1 className="section_title">Извините</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="offline">
|
||||||
|
<p>
|
||||||
|
К сожалению возникла техническая проблема, наши специалисты в курсе и проводят восстановительные работы.<br/><br/><Link href="/"><a style={{ textDecoration: "underline" }}>Вернуться в Личный кабинет</a></Link>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
<Footer/>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ErrorPage;
|
||||||
@ -31,7 +31,7 @@ export default async function handler(req, res)
|
|||||||
console.log(existed_data_json);
|
console.log(existed_data_json);
|
||||||
console.log("*".repeat(50));
|
console.log("*".repeat(50));
|
||||||
|
|
||||||
token = jwt.sign({ "acc_number": existed_data_json.acc_number, login: existed_data_json.user.email, companies: existed_data_json.companies, }, process.env.JWT_SECRET_CLIENT, { noTimestamp: true });
|
token = jwt.sign({ "acc_number": existed_data_json.acc_number, is_admin: existed_data_json.user.is_admin, login: existed_data_json.user.email, companies: existed_data_json.companies, }, process.env.JWT_SECRET_CLIENT, { noTimestamp: true });
|
||||||
|
|
||||||
res.status(200).json({ ...existed_data_json, ...{ status: "success", token: token, } });
|
res.status(200).json({ ...existed_data_json, ...{ status: "success", token: token, } });
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,9 @@ export default async function handler(req, res)
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
axios.get(`${ process.env.CRM_API_HOST }/lk/Account/GetCompanyInfo/`, {
|
axios.get(`${ process.env.CRM_API_HOST }/lk/Account/GetCompanyInfo/`, {
|
||||||
params: client_jwt_decoded,
|
params: {
|
||||||
|
acc_number: client_jwt_decoded.acc_number,
|
||||||
|
},
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization": `Bearer ${ crm_jwt }`,
|
"Authorization": `Bearer ${ crm_jwt }`,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -211,7 +211,7 @@ class Header extends React.Component
|
|||||||
</div>
|
</div>
|
||||||
<ul className="system_nav">
|
<ul className="system_nav">
|
||||||
<li>
|
<li>
|
||||||
<a data-icon="phone" className="button">Телефон</a>
|
<Link href="tel:88003337575"><a data-icon="phone" className="button">Телефон</a></Link>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a data-icon="notify" data-notify={ events !== undefined && events !== null ? events.length : 0 } className="button" onClick={ this._handle_onToggleNotifications }>
|
<a data-icon="notify" data-notify={ events !== undefined && events !== null ? events.length : 0 } className="button" onClick={ this._handle_onToggleNotifications }>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user