|
@@ -52,6 +52,19 @@ export default {
|
|
|
handleClickOutside() {
|
|
|
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false });
|
|
|
},
|
|
|
+ getSystemSetting() {
|
|
|
+ this.$axios.get('/get_setting').then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ const { web_name, background_img, logo, menu_logo } = res.data
|
|
|
+ this.$store.dispatch('app/setSystemSetting', {
|
|
|
+ background_img: background_img.content,
|
|
|
+ logo: logo.content,
|
|
|
+ menu_logo: menu_logo.content,
|
|
|
+ web_name: web_name.content
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
// 目标元素
|
|
@@ -69,6 +82,7 @@ export default {
|
|
|
|
|
|
// 开始观察
|
|
|
this.observer.observe(targetElement);
|
|
|
+ this.getSystemSetting();
|
|
|
// document.getElementById('mainContainer').style.width = `calc(100% - (${document.getElementById('sidebarContainer')}px))`
|
|
|
// document.getElementById('mainContainer').style.width = `${document.getElementsByClassName('app-wrapper')[0].offsetWidth - document.getElementsByClassName('sidebar-container')[0].offsetWidth}px`
|
|
|
},
|