Commit 5839a14b authored by nano's avatar nano

fix basename

parent b2458440
This diff is collapsed.
...@@ -11,7 +11,14 @@ const RETURN_SSO = { ...@@ -11,7 +11,14 @@ const RETURN_SSO = {
production: `https://moecube.com/console/loginCallback` production: `https://moecube.com/console/loginCallback`
}; };
const BASENAME = {
development: ``,
test:``,
production: '/console'
}
let defineConf = { let defineConf = {
BASENAME: BASENAME[process.env['ENV']],
apiRoot: API_ROOT[process.env['ENV']], apiRoot: API_ROOT[process.env['ENV']],
returnSSO: RETURN_SSO[process.env['ENV']] returnSSO: RETURN_SSO[process.env['ENV']]
}; };
......
...@@ -3,9 +3,8 @@ ...@@ -3,9 +3,8 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="index.css"/>
<link rel="icon" href="https://moecube.com/favicon.ico"> <link rel="icon" href="https://moecube.com/favicon.ico">
<!--<base href="https://moecube.com/console/">--> <link rel="stylesheet" href="index.css"/>
</head> </head>
<body> <body>
......
import ReactDOM from 'react-dom'; import ReactDOM from "react-dom";
import {browserHistory} from 'dva/router' import {useRouterHistory} from "dva/router";
import createLoading from 'dva-loading' import {createHistory} from "history";
import {message} from 'antd' import createLoading from "dva-loading";
import dva from 'dva'; import {message} from "antd";
import './index.less'; import dva from "dva";
import "./index.less";
// 1. Initialize // 1. Initialize
const app = dva({ const app = dva({
...@@ -11,7 +12,9 @@ const app = dva({ ...@@ -11,7 +12,9 @@ const app = dva({
message.destroy(); message.destroy();
message.error(error.message); message.error(error.message);
}, },
history: browserHistory, history: useRouterHistory(createHistory)({
basename: BASENAME
}),
}); });
app.model(require("./models/Apps")); app.model(require("./models/Apps"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment