CN-714 feat: 将linkInfo在登录时缓存

This commit is contained in:
chenjinsong
2022-09-23 17:02:07 +08:00
parent 326149484f
commit af2bf4c96a
2 changed files with 7 additions and 1 deletions

View File

@@ -82,6 +82,11 @@ const user = {
localStorage.setItem(storageKey.drillDownTableConfig, res.page.list[0].cvalue)
}
})
get(api.config, { ckey: 'link_info' }).then(res => {
if (res.code === 200 && res.page.list && res.page.list.length > 0) {
localStorage.setItem(storageKey.linkInfo, res.page.list[0].cvalue)
}
})
},
logoutSuccess (store, res) {
localStorage.removeItem(storageKey.username)

View File

@@ -30,7 +30,8 @@ export const storageKey = {
echartLegendFontSize: 'echartLegendFontSize',
echartLabelFontSize: 'echartLabelFontSize',
tokenExpireCurrentPath: 'token-expire-current-path',
drillDownTableConfig: 'cn-drill-down-table-config'
drillDownTableConfig: 'cn-drill-down-table-config',
linkInfo: 'cn-link-info'
}
export const largeCountryList = ['CN', 'US', 'RU', 'AU', 'CA', 'KZ', 'IN', 'BR']