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
......
......@@ -110,7 +110,7 @@ export const initMicroApps = (loader, store) => {
experimentalStyleIsolation: false,
loose: true,
},
singular: true,
singular: false,
scopedCSS: true,
prefetch: 'all',
// eslint-disable-next-line no-underscore-dangle
......@@ -119,6 +119,8 @@ export const initMicroApps = (loader, store) => {
url.indexOf('framework/highcharts') !== -1 ||
url.indexOf('framework/amap/AMap.UI') !== -1 ||
url.indexOf('framework/amap/init.js') !== -1 ||
url.indexOf('framework/4.9/init.js') !== -1 ||
url.indexOf('framework/jquery') !== -1 ||
url.indexOf('configuration/js') !== -1 ||
url.indexOf('framework/three.js') !== -1 ||
url.indexOf('threedimensional/frameworkthree') !== -1 ||
......@@ -235,30 +237,30 @@ window.app = {
}
};
// window.app.define('city-data', require.context('./components/CitySelector', true, /^.\/(CitySelector\/)?[^\/]+\.js$/), 'city-data.js')
window.app.define('react', require.context('react', true, /^.\/index\.js$/), 'index.js');
window.app.define('react-dom', require.context('react-dom', true, /^.\/index\.js$/), 'index.js');
window.app.define('react-router', require.context('react-router', true, /^.\/index\.js$/), 'index.js');
window.app.define('lodash', require.context('lodash', true, /^.\/index\.js$/), 'index.js');
window.app.define('connected-react-router', require.context('../node_modules/connected-react-router/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('react-helmet', require.context('../node_modules/react-helmet/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'Helmet.js');
window.app.define('qrcode.react', require.context('../node_modules/qrcode.react/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('qr.js', require.context('qr.js', true, /^.\/index\.js$/), 'index.js');
window.app.define('query-string', require.context('query-string', true, /^.\/index\.js$/), 'index.js');
window.app.define('react-helmet-async', require.context('../node_modules/react-helmet-async/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('immutable', require.context('../node_modules/immutable/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'immutable.min.js');
window.app.define('redux-immutable', require.context('../node_modules/redux-immutable/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'index.js');
window.app.define('redux-logger', require.context('../node_modules/redux-logger/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'redux-logger.js');
window.app.define('react-router-dom', require.context('react-router-dom', true, /^.\/index\.js$/), 'index.js');
window.app.define('react-redux', require.context('../node_modules/react-redux/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'react-redux.min.js');
window.app.define('redux', require.context('../node_modules/redux/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'redux.min.js');
window.app.define('mqtt-client', require.context('../node_modules/mqtt-client/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('kit_logger', require.context('../node_modules/kit_logger/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('kit_utils', require.context('../node_modules/kit_utils/lib', true, /^.\/(lib\/)?[^\/]+\.js$/));
window.app.define('kit_global_config', require.context('../node_modules/kit_global_config/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@wisdom-utils/utils', require.context('../node_modules/@wisdom-utils/utils/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@wisdom-utils/runtime', require.context('../node_modules/@wisdom-utils/runtime/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@wisdom-utils/components', require.context('../node_modules/@wisdom-utils/components/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('react', require.context('react', true, /^.\/index\.js$/), 'index.js');
// window.app.define('react-dom', require.context('react-dom', true, /^.\/index\.js$/), 'index.js');
// window.app.define('react-router', require.context('react-router', true, /^.\/index\.js$/), 'index.js');
// window.app.define('lodash', require.context('lodash', true, /^.\/index\.js$/), 'index.js');
// window.app.define('connected-react-router', require.context('../node_modules/connected-react-router/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('react-helmet', require.context('../node_modules/react-helmet/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'Helmet.js');
// window.app.define('qrcode.react', require.context('../node_modules/qrcode.react/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('qr.js', require.context('qr.js', true, /^.\/index\.js$/), 'index.js');
// window.app.define('query-string', require.context('query-string', true, /^.\/index\.js$/), 'index.js');
// window.app.define('react-helmet-async', require.context('../node_modules/react-helmet-async/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('immutable', require.context('../node_modules/immutable/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'immutable.min.js');
// window.app.define('redux-immutable', require.context('../node_modules/redux-immutable/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('redux-logger', require.context('../node_modules/redux-logger/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'redux-logger.js');
// window.app.define('react-router-dom', require.context('react-router-dom', true, /^.\/index\.js$/), 'index.js');
// window.app.define('react-redux', require.context('../node_modules/react-redux/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'react-redux.min.js');
// window.app.define('redux', require.context('../node_modules/redux/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'redux.min.js');
// window.app.define('mqtt-client', require.context('../node_modules/mqtt-client/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('kit_logger', require.context('../node_modules/kit_logger/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('kit_utils', require.context('../node_modules/kit_utils/lib', true, /^.\/(lib\/)?[^\/]+\.js$/));
// window.app.define('kit_global_config', require.context('../node_modules/kit_global_config/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('@wisdom-utils/utils', require.context('../node_modules/@wisdom-utils/utils/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('@wisdom-utils/runtime', require.context('../node_modules/@wisdom-utils/runtime/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('@wisdom-utils/components', require.context('../node_modules/@wisdom-utils/components/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
/**
* arcgismap
......@@ -447,45 +449,45 @@ window.app.define('@wisdom-utils/components', require.context('../node_modules/@
window.app.define('classnames', require.context('classnames', true, /^.\/index\.js$/), 'index.js');
window.app.define('@ant-design/icons', require.context('../node_modules/@ant-design/icons/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@ant-design/pro-utils', require.context('../node_modules/@ant-design/pro-utils/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@ant-design/pro-layout', require.context('../node_modules/@ant-design/pro-layout/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@ant-design/pro-table', require.context('../node_modules/@ant-design/pro-table/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@ant-design/pro-provider', require.context('../node_modules/@ant-design/pro-provider/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('pinyin-match', require.context('../node_modules/pinyin-match/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'main.js');
window.app.define('react-intl', require.context('../node_modules/react-intl/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('moment', require.context('moment', true, /^.\/moment\.js$/), 'moment.js');
window.app.define('rc-align', require.context('../node_modules/rc-align/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-cascader', require.context('../node_modules/rc-cascader/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-checkbox', require.context('../node_modules/rc-checkbox/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-collapse', require.context('../node_modules/rc-collapse/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js')
window.app.define('rc-dialog', require.context('../node_modules/rc-dialog/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-drawer', require.context('../node_modules/rc-drawer/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-dropdown', require.context('../node_modules/rc-dropdown/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-field-form', require.context('../node_modules/rc-field-form/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-image', require.context('../node_modules/rc-image/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-input-number', require.context('../node_modules/rc-input-number/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-mentions', require.context('../node_modules/rc-mentions/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-menu', require.context('../node_modules/rc-menu/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-motion', require.context('../node_modules/rc-motion/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-notification', require.context('../node_modules/rc-notification/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-overflow', require.context('../node_modules/rc-overflow/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-pagination', require.context('../node_modules/rc-pagination/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-picker', require.context('../node_modules/rc-picker/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-progress', require.context('../node_modules/rc-progress/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-rate', require.context('../node_modules/rc-rate/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-resize-observer', require.context('../node_modules/rc-resize-observer/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-select', require.context('../node_modules/rc-select/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-slider', require.context('../node_modules/rc-slider/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-steps', require.context('../node_modules/rc-steps/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-switch', require.context('../node_modules/rc-switch/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-table', require.context('../node_modules/rc-table/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-tabs', require.context('../node_modules/rc-tabs/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-textarea', require.context('../node_modules/rc-textarea/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-tooltip', require.context('../node_modules/rc-tooltip/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-tree', require.context('../node_modules/rc-tree/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-tree-select', require.context('../node_modules/rc-tree-select/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-trigger', require.context('../node_modules/rc-trigger/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-upload', require.context('../node_modules/rc-upload/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('rc-virtual-list', require.context('../node_modules/rc-virtual-list/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('classnames', require.context('classnames', true, /^.\/index\.js$/), 'index.js');
// window.app.define('@ant-design/icons', require.context('../node_modules/@ant-design/icons/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('@ant-design/pro-utils', require.context('../node_modules/@ant-design/pro-utils/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('@ant-design/pro-layout', require.context('../node_modules/@ant-design/pro-layout/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('@ant-design/pro-table', require.context('../node_modules/@ant-design/pro-table/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('@ant-design/pro-provider', require.context('../node_modules/@ant-design/pro-provider/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('pinyin-match', require.context('../node_modules/pinyin-match/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'main.js');
// window.app.define('react-intl', require.context('../node_modules/react-intl/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('moment', require.context('moment', true, /^.\/moment\.js$/), 'moment.js');
// window.app.define('rc-align', require.context('../node_modules/rc-align/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-cascader', require.context('../node_modules/rc-cascader/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-checkbox', require.context('../node_modules/rc-checkbox/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-collapse', require.context('../node_modules/rc-collapse/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js')
// window.app.define('rc-dialog', require.context('../node_modules/rc-dialog/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-drawer', require.context('../node_modules/rc-drawer/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-dropdown', require.context('../node_modules/rc-dropdown/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-field-form', require.context('../node_modules/rc-field-form/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-image', require.context('../node_modules/rc-image/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-input-number', require.context('../node_modules/rc-input-number/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-mentions', require.context('../node_modules/rc-mentions/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-menu', require.context('../node_modules/rc-menu/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-motion', require.context('../node_modules/rc-motion/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-notification', require.context('../node_modules/rc-notification/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-overflow', require.context('../node_modules/rc-overflow/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-pagination', require.context('../node_modules/rc-pagination/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-picker', require.context('../node_modules/rc-picker/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-progress', require.context('../node_modules/rc-progress/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-rate', require.context('../node_modules/rc-rate/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-resize-observer', require.context('../node_modules/rc-resize-observer/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-select', require.context('../node_modules/rc-select/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-slider', require.context('../node_modules/rc-slider/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-steps', require.context('../node_modules/rc-steps/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-switch', require.context('../node_modules/rc-switch/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-table', require.context('../node_modules/rc-table/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-tabs', require.context('../node_modules/rc-tabs/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-textarea', require.context('../node_modules/rc-textarea/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-tooltip', require.context('../node_modules/rc-tooltip/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-tree', require.context('../node_modules/rc-tree/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-tree-select', require.context('../node_modules/rc-tree-select/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-trigger', require.context('../node_modules/rc-trigger/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-upload', require.context('../node_modules/rc-upload/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// window.app.define('rc-virtual-list', require.context('../node_modules/rc-virtual-list/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
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