Browse Source

替换路由模式

JXDS18FUJT 2 years ago
parent
commit
ff40f98d34
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/router/index.js

+ 6 - 1
src/router/index.js

@@ -8,6 +8,11 @@ import {BrowserRouter, HashRouter, Switch, Route, Redirect} from 'react-router-d
 import {asyncComponent} from '../utils/asyncComponent';
 
 const routes = [
+    {
+        path:"/",
+        exact: true,
+        component: asyncComponent(() => import('../views/videoKindList/videoKindList'))
+    },
 
         {
         path: '/videoKindList',
@@ -32,7 +37,7 @@ const routes = [
 ];
 
 /* 本地环境使用BrowserRouter, 线上环境使用HashRouter */
-let Router = process.env.NODE_ENV !== 'production' ? BrowserRouter : HashRouter;
+let Router = BrowserRouter ;
 
 const RouterConfig = (
     <Router>