|
|
@@ -1,4 +1,5 @@
|
|
|
import defaultSettings from '@/settings';
|
|
|
+import { getPortalImg } from '@/api/portal/portal';
|
|
|
|
|
|
const {
|
|
|
sideTheme,
|
|
|
@@ -14,6 +15,7 @@ const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || '';
|
|
|
const state = {
|
|
|
title: '',
|
|
|
theme: storageSetting.theme || '#14A478',
|
|
|
+ logo: '',
|
|
|
sideTheme: storageSetting.sideTheme || sideTheme,
|
|
|
showSettings: showSettings,
|
|
|
topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,
|
|
|
@@ -48,6 +50,18 @@ const actions = {
|
|
|
// 设置网页标题
|
|
|
setTitle({ commit }, title) {
|
|
|
state.title = title;
|
|
|
+ getPortalSystemInfo(context) {
|
|
|
+ const { commit, state } = context;
|
|
|
+ if (state.logo) {
|
|
|
+ return Promise.resolve(state.logo);
|
|
|
+ }
|
|
|
+
|
|
|
+ return getPortalImg().then((res) => {
|
|
|
+ commit('CHANGE_SETTING', { key: 'logo', value: res.data.logoUrl });
|
|
|
+
|
|
|
+ return res.data;
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
|