/*
|
* @Company: hugeInfo
|
* @Author: ldh
|
* @Date: 2022-03-04 14:29:11
|
* @LastEditTime: 2022-08-05 09:45:54
|
* @LastEditors: ldh
|
* @Version: 1.0.0
|
* @Description: 页面框架
|
*/
|
import React from 'react';
|
import PropTypes from 'prop-types';
|
import PageHead from './PageHead';
|
import './index.less';
|
import * as $$ from '../../utils/utility';
|
import RegisterChooseModal from '../RegisterChooseModal';
|
|
const NewPage = ({ children, pageHead, registerChooseModalVisible }) => {
|
if (!$$.getSessionStorage('customerSystemToken')) {
|
$$.catchApiError({ content: '抱歉!登录状态已失效请重新登录', loginStatus: 'lose' });
|
return null;
|
}
|
|
return (
|
<>
|
{!!pageHead && <PageHead {...pageHead} />}
|
{children}
|
{/* 纠纷登录入口modal */}
|
{!!registerChooseModalVisible && <RegisterChooseModal visible={registerChooseModalVisible} />}
|
</>
|
);
|
};
|
|
NewPage.propTypes = {
|
pageHead: PropTypes.any,
|
registerChooseModalVisible: PropTypes.any,
|
};
|
|
export default NewPage;
|