import React from 'react';
import Media from 'react-media';
import { connect } from 'dva';
import PageLoading from '@/components/PageLoading';
import BasicLayout from './BasicLayout';
class LayoutWrapper extends React.PureComponent {
componentDidMount() {
const { dispatch, currentSite, location } = this.props;
const isApplyPage = location.pathname.includes('/apply');
// 非 apply 页 & currentSite 为空,初始化请求
if (!isApplyPage) {
dispatch({ type: 'global/get_site_list_data', payload: { isAll: true } });
}
}
render() {
const { currentSite, location } = this.props;
const isApplyPage = location.pathname.includes('/apply');
if (isApplyPage) {
// apply 页直接加载 BasicLayout
return (