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

fix: 切换站点后重置三级菜单

parent 9ccbc610
...@@ -342,6 +342,22 @@ class Site { ...@@ -342,6 +342,22 @@ class Site {
self.setLoading(false); self.setLoading(false);
// eslint-disable-next-line no-unused-expressions // eslint-disable-next-line no-unused-expressions
self.props.updateCurrentIndex && self.props.updateCurrentIndex(0); self.props.updateCurrentIndex && self.props.updateCurrentIndex(0);
// 切换站点后,重置掉三级菜单
const homeType = self.globalConfig.homeType || 'civweb4';
const homePath =
self.globalConfig.homepage
? self.globalConfig.homepage.startsWith(homeType)
? self.globalConfig.homepage
: `/${homeType}/${self.globalConfig.homepage}`
: `/homeType`;
window.share && window.share.event && window.share.event.emit('event:favitor', {
name: "首页",
path: homePath,
icon: null,
});
// window.history.replaceState( // window.history.replaceState(
// '', // '',
// '', // '',
......
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