import React, { Component } from 'react' import { HashRouter as Router, Route } from 'react-router-dom' import './App.css' import './assets/comm.css' import { Redirect } from 'react-router-dom' import { lazy, Suspense } from 'react' import { FullScreenLoading } from 'zent' const Home = lazy(() => import('./pages/home/home')) const Login = lazy(() => import('./pages/login/login')) const ErrPage = lazy(() => import('./pages/errpage/errpage')) const EdittemPlate = lazy(() => import('./pages/exchangepage/edittemplate/main.js') ) export default class App extends Component { state = { pathname: '' } componentWillMount() { const pathname = window.location.href.lastIndexOf('/') const pathnamestr = window.location.href.substr(pathname) this.setState({ pathname: `${pathnamestr}` }) } render() { return ( }> }> ) } }