Commit 7668e3f2 authored by 邓晓峰's avatar 邓晓峰

feat: 优化获取站点信息

parent b598913e
Pipeline #47904 skipped with stages
......@@ -337,13 +337,13 @@ class Site {
self.props.updateCurrentIndex && self.props.updateCurrentIndex(-1);
const login = new Login(this.props, () => {
self.setLoading(false);
self.getCityStationsForUser().then(res => {
window.share.event.emit('updateSite', res);
});
// eslint-disable-next-line no-unused-expressions
self.props.updateCurrentIndex && self.props.updateCurrentIndex(0);
// debugger
// initMicroApps();
// 切换站点后,重置掉三级菜单
const homeType = self.globalConfig.homeType || 'civweb4';
const homePath = self.globalConfig.homepage ? self.globalConfig.homepage.startsWith(homeType) ? self.globalConfig.homepage: `/${homeType}/${self.globalConfig.homepage}`: `/${homeType}`;
......@@ -355,20 +355,12 @@ class Site {
// 重新加载订阅消息铃铛
window.share && window.share.event && window.share.event.emit('reloadNotice');
const config = self.globalConfig;
let url = !config.home ? ((config.homepage === '' || _.isNull(config.homepage)) ? `/civweb4`: `/civweb4/${config.homepage.replace(/^\//, '').replace(/^civweb4\//, '')}`) : `/${config.homepage.replace(/^\//, '')}`;
self.props.history && self.props.history.push(url)
self.getCityStationsForUser().then(res => {
debugger
window.share.event.emit('updateSite', res);
});
self.props &&
self.props.updateCollapsed &&
self.props.updateCollapsed(false);
const config = self.globalConfig;
let url = !config.home ? ((config.homepage === '' || _.isNull(config.homepage)) ? `/civweb4`: `/civweb4/${config.homepage.replace(/^\//, '').replace(/^civweb4\//, '')}`) : `/${config.homepage.replace(/^\//, '')}`;
self.props.history && self.props.history.push(url);
self.props && self.props.updateCollapsed && self.props.updateCollapsed(false);
window.share.event.emit('triggerMicro', this.props.global);
// onChangeVisible && onChangeVisible(false);
onChangeVisible && onChangeVisible(false);
});
login.init();
}
......
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