|
@@ -64,7 +64,8 @@ export default {
|
|
|
mainContent: 'aui-content__wrapper',
|
|
|
auiWrapper: '',
|
|
|
isMainMenuHaveChild: true,
|
|
|
- menuDataAll: []
|
|
|
+ menuDataAll: [],
|
|
|
+ areaCode: ''
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -87,6 +88,7 @@ export default {
|
|
|
this.getUserInfo(),
|
|
|
this.getPermissions()
|
|
|
]).then(() => {
|
|
|
+ this.getTitleLogo()
|
|
|
this.loading = false
|
|
|
})
|
|
|
this.loading = false
|
|
@@ -261,8 +263,12 @@ export default {
|
|
|
if (res.code !== 0) {
|
|
|
return this.$message.error(res.msg)
|
|
|
}
|
|
|
+ console.log(res)
|
|
|
this.$store.state.user.name = res.userInfo.displayName
|
|
|
this.$store.state.user.organizations = res.userInfo.organizations[0].organizationName
|
|
|
+ if (res.userInfo.extendField && res.userInfo.extendField.regionCode) {
|
|
|
+ this.areaCode = res.userInfo.extendField.regionCode
|
|
|
+ }
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
// 获取权限
|
|
@@ -274,6 +280,21 @@ export default {
|
|
|
this.$store.dispatch('permission', res.buttonList)
|
|
|
window.SITE_CONFIG['permissions'] = res.buttonList
|
|
|
}).catch(() => {})
|
|
|
+ },
|
|
|
+ getTitleLogo () {
|
|
|
+ if (!this.areaCode) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$http.get('http://10.110.34.19:30600/sysbase/area/admin/getCityAreaByCode?areaCode=' + this.areaCode).then(({ data: res }) => {
|
|
|
+ if (res.code !== '0') {
|
|
|
+ return this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ res.result.areaTitle && (document.title = res.result.areaTitle)
|
|
|
+ if (res.result.areaLogo) {
|
|
|
+ // window.$('link[rel="shortcut icon"]').attr('href', res.result.areaLogo)
|
|
|
+ window.$('.navbar-logo img').attr('src', res.result.areaLogo)
|
|
|
+ }
|
|
|
+ }).catch(() => {})
|
|
|
}
|
|
|
}
|
|
|
}
|