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

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

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