广州市综治平台前端
xusd
8 days ago 544148eddae96db824423cd059ebecb9d13c392e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * @Company: hugeInfo
 * @Author: ldh
 * @Date: 2022-03-04 14:29:11
 * @LastEditTime: 2024-10-21 10:08:19
 * @LastEditors: lwh
 * @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 Page = ({ children, pageHead, registerChooseModalVisible }) => {
  if (!$$.getSessionStorage('customerSystemToken')) {
    console.log('token不存在');
    $$.catchApiError({ content: '抱歉!登录状态已失效请重新登录', loginStatus: 'lose' });
    return null;
  }
 
  return (
    <>
      {!!pageHead && <PageHead {...pageHead} />}
      {children}
      {/* 纠纷登录入口modal */}
      {!!registerChooseModalVisible && <RegisterChooseModal visible={registerChooseModalVisible} />}
    </>
  );
};
 
Page.propTypes = {
  pageHead: PropTypes.any,
  registerChooseModalVisible: PropTypes.any,
};
 
export default Page;