AJReport浏览器缓存LocalStorage的key修改

木子李·De 3 years ago
parent dec8f15702
commit ec4d30e54f

@ -71,7 +71,7 @@ export function initDictToLocalstorage(callback) {
} }
// 保存数据字典到localStorage // 保存数据字典到localStorage
setStorageItem('gaeaDict', res.data) setStorageItem('AJReportDict', res.data)
if (callback != null) { if (callback != null) {
callback() callback()
} }

@ -317,7 +317,7 @@ export default {
// 根据数据字典查询指定字典dict指定值code的返回整个dictItem{id, text, extend} // 根据数据字典查询指定字典dict指定值code的返回整个dictItem{id, text, extend}
getDictItemByCode (dict, code) { getDictItemByCode (dict, code) {
let dicts = getStorageItem('gaeaDict') let dicts = getStorageItem('AJReportDict')
if (!dicts.hasOwnProperty(dict)) { if (!dicts.hasOwnProperty(dict)) {
return null return null
} }
@ -355,7 +355,7 @@ export default {
return dictItem['extend'] return dictItem['extend']
}, },
getSettingByName(settingName) { getSettingByName(settingName) {
let gaeaSetting = JSON.parse(localStorage.getItem('gaeaDict')) let gaeaSetting = JSON.parse(localStorage.getItem('AJReportDict'))
if (gaeaSetting[settingName] != null) { if (gaeaSetting[settingName] != null) {
return gaeaSetting[settingName] return gaeaSetting[settingName]
} else { } else {

@ -1,8 +1,8 @@
import { getStorageItem, setStorageItem, delStorageItem } from '@/utils/storage' import { getStorageItem, setStorageItem, delStorageItem } from '@/utils/storage'
const TokenKey = 'token' const TokenKey = 'AJReportToken'
const ShareTokenKey = 'shareToken' const ShareTokenKey = 'AJReportShareToken'
const AccessUserKey = 'gaeaUser' const AccessUserKey = 'AJReportUser'
export function getToken() { export function getToken() {
return getStorageItem(TokenKey) return getStorageItem(TokenKey)

Loading…
Cancel
Save