Commit c2faef1c authored by 崔佳豪's avatar 崔佳豪

fix: 首页光有产品类型时的异常问题

parent 9621d3aa
......@@ -376,7 +376,7 @@ class Site {
self.props &&
self.props.updateComplexConfig &&
self.props.updateComplexConfig({});
self.props.history && self.props.history.push(self.globalConfig.homepage ?? `/?client=${self.globalConfig.client}`);
self.props.history && self.props.history.push(self.globalConfig.homepage ? `/${self.globalConfig.homepage}` : `/?client=${self.globalConfig.client}`);
// window.location.reload();
window.share.event.emit('triggerMicro', this.props.global);
});
......
......@@ -223,11 +223,18 @@ class Login {
if (result && result.length > 0) {
const config = result.shift();
const homeType = config.productType || 'civweb4';
// 产品类型和首页路径同时有才行
const homepage =
homeType && (params.getParams('redirect') || config.homepage)
? homeType +
'/' +
(params.getParams('redirect') || config.homepage)
: '';
self.globalConfig = Object.assign(self.globalConfig, config, {
theme: self.globalConfig.theme,
menu: self.globalConfig.menu,
style: self.globalConfig.style,
homepage: homeType + '/' + (params.getParams('redirect') || config.homepage),
homepage: homepage,
});
if(self.globalConfig.hasOwnProperty('webConfig')) {
......
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