Bläddra i källkod

非平台方用户登录不显示任何内容

zhanghe 7 år sedan
förälder
incheckning
9da6d2dd6b
1 ändrade filer med 31 tillägg och 29 borttagningar
  1. 31 29
      src/layouts/BasicLayout.js

+ 31 - 29
src/layouts/BasicLayout.js

@@ -118,36 +118,38 @@ class BasicLayout extends React.PureComponent {
             dispatch={dispatch}
             isMobile={this.state.isMobile}
           />
-          <Content style={{ margin: '24px 24px 0', height: '100%' }}>
-            <div style={{ minHeight: 'calc(100vh - 260px)' }}>
-              <Switch>
-                {
-                  redirectData.map(item =>
-                    <Redirect key={item.from} exact from={item.from} to={item.to} />
-                  )
+          {currentUser.platForm &&
+            <Content style={{ margin: '24px 24px 0', height: '100%' }}>
+              <div style={{ minHeight: 'calc(100vh - 260px)' }}>
+                <Switch>
+                  {
+                    redirectData.map(item =>
+                      <Redirect key={item.from} exact from={item.from} to={item.to} />
+                    )
+                  }
+                  {
+                    getRoutes(match.path, routerData).map(item => (
+                      <Route
+                        key={item.key}
+                        path={item.path}
+                        component={item.component}
+                        exact={item.exact}
+                      />
+                    ))
+                  }
+                  <Redirect exact from="/" to="/sold" />
+                  <Route render={NotFound} />
+                </Switch>
+              </div>
+              <GlobalFooter
+                copyright={
+                  <div>
+                    Copyright <Icon type="copyright" /> 2017-2020 领教信息科技有限公司
+                  </div>
                 }
-                {
-                  getRoutes(match.path, routerData).map(item => (
-                    <Route
-                      key={item.key}
-                      path={item.path}
-                      component={item.component}
-                      exact={item.exact}
-                    />
-                  ))
-                }
-                <Redirect exact from="/" to="/sold" />
-                <Route render={NotFound} />
-              </Switch>
-            </div>
-            <GlobalFooter
-              copyright={
-                <div>
-                  Copyright <Icon type="copyright" /> 2017-2020 领教信息科技有限公司
-                </div>
-              }
-            />
-          </Content>
+              />
+            </Content>
+          }
         </Layout>
       </Layout>
     );