Commit c4d1b9bd authored by 邓晓峰's avatar 邓晓峰

fix: 修复退出登录时,获取client不准备BUG

parent 336e5615
This diff was suppressed by a .gitattributes entry.
/* eslint-disable */ /* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin; // const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
const proxyURL = 'http://192.168.12.47:8081'; const proxyURL = 'https://panda-water.com';
module.exports = { module.exports = {
assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './', assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
dev: { dev: {
......
...@@ -46,8 +46,8 @@ module.exports = require('./webpack.base.babel')({ ...@@ -46,8 +46,8 @@ module.exports = require('./webpack.base.babel')({
concatenateModules: true, concatenateModules: true,
runtimeChunk: 'single', runtimeChunk: 'single',
splitChunks: { splitChunks: {
maxSize: 100 * 1024, // 控制包的最大字节数 // maxSize: 100 * 1024, // 控制包的最大字节数
minSize: 10 * 1024, // 控制包的最小字节数 // minSize: 10 * 1024, // 控制包的最小字节数
cacheGroups: { cacheGroups: {
vendor: { vendor: {
......
...@@ -104,20 +104,20 @@ const initGlobalConfig = () => { ...@@ -104,20 +104,20 @@ const initGlobalConfig = () => {
updateTheme('#ff9600'); updateTheme('#ff9600');
} }
} else { } else {
appService.getWateWayConfig().then(res => { // appService.getWateWayConfig().then(res => {
const hasGateWay = // const hasGateWay =
res && res.data && isString(res.data) ? JSON.parse(res.data) : res.data; // res && res.data && isString(res.data) ? JSON.parse(res.data) : res.data;
if (res.code === 0) { // if (res.code === 0) {
store.dispatch( // store.dispatch(
actionCreators.getConfig( // actionCreators.getConfig(
Object.assign({}, window.globalConfig, { // Object.assign({}, window.globalConfig, {
hasGateWay, // hasGateWay,
apiGatewayDomain: `${window.location.origin}/PandaCore/GateWay`, // apiGatewayDomain: `${window.location.origin}/PandaCore/GateWay`,
}), // }),
), // ),
); // );
} // }
}); // });
// eslint-disable-next-line react-hooks/rules-of-hooks // eslint-disable-next-line react-hooks/rules-of-hooks
appService appService
.queryConfig({ .queryConfig({
...@@ -135,6 +135,8 @@ const initGlobalConfig = () => { ...@@ -135,6 +135,8 @@ const initGlobalConfig = () => {
), ),
); );
Cookies.set('city', data.client)
if (data.loginTemplate === '新春 - 智联.html') { if (data.loginTemplate === '新春 - 智联.html') {
updateTheme('#ff9600'); updateTheme('#ff9600');
} }
...@@ -170,9 +172,9 @@ const initGlobalConfig = () => { ...@@ -170,9 +172,9 @@ const initGlobalConfig = () => {
// eslint-disable-next-line no-shadow // eslint-disable-next-line no-shadow
.then(res => { .then(res => {
// eslint-disable-next-line no-use-before-define // eslint-disable-next-line no-use-before-define
initSensorType(); // initSensorType();
// eslint-disable-next-line no-use-before-define // eslint-disable-next-line no-use-before-define
initIsMock(); // initIsMock();
render({ appContent: '', loading: true }); render({ appContent: '', loading: true });
}) })
.catch(error => { .catch(error => {
......
...@@ -61,6 +61,7 @@ class AvatarDropdown extends React.Component { ...@@ -61,6 +61,7 @@ class AvatarDropdown extends React.Component {
} }
} }
loginout = event => { loginout = event => {
debugger
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
this.props.logout(); this.props.logout();
if ( if (
......
...@@ -22,8 +22,6 @@ const defaultSetting = config.layout; ...@@ -22,8 +22,6 @@ const defaultSetting = config.layout;
function App(props) { function App(props) {
const { routes } = dyRoutes(props.menu);
console.log("routes", routes)
return ( return (
<> <>
<Helmet <Helmet
......
This diff is collapsed.
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