|
@@ -1,6 +1,6 @@
|
|
|
import frameworkApi from '@/api/framework'
|
|
|
import storage from '@/framework/utils/storage'
|
|
|
-import localStorage from '@/utils/localStorage'
|
|
|
+import lStorage from '@/utils/localStorage'
|
|
|
import axios from 'axios'
|
|
|
import authutils from '../../utils/authutils'
|
|
|
|
|
@@ -62,18 +62,18 @@ export default {
|
|
|
setSidebarSelected: (state, val) => {
|
|
|
state.sidebarSelected = val
|
|
|
storage.set(KEY_MENU_SELECTED, val)
|
|
|
- localStorage.set('screen_data', {path: val,data: {}})
|
|
|
+ lStorage.set('screen_data', {path: val,data: {}})
|
|
|
},
|
|
|
setprojectId: (state, val) => {
|
|
|
- let cacheInfo = JSON.parse(localStorage.getItem('_sagacloud_admin_store_cacheInfo'))?JSON.parse(localStorage.getItem('_sagacloud_admin_store_cacheInfo')):{}
|
|
|
+ let cacheInfo = lStorage.get('cacheInfo')?lStorage.get('cacheInfo'):{}
|
|
|
state.projectId = val
|
|
|
localStorage.setItem('projectId', val)
|
|
|
if(cacheInfo[state.userInfo.userName]){
|
|
|
cacheInfo[state.userInfo.userName].projectId = val
|
|
|
- localStorage.setItem('_sagacloud_admin_store_cacheInfo', JSON.stringify(cacheInfo))
|
|
|
+ lStorage.set('cacheInfo', cacheInfo)
|
|
|
} else {
|
|
|
cacheInfo[state.userInfo.userName] = {projectId: val}
|
|
|
- localStorage.setItem('_sagacloud_admin_store_cacheInfo', JSON.stringify(cacheInfo))
|
|
|
+ lStorage.set('cacheInfo', cacheInfo)
|
|
|
}
|
|
|
storage.set(KEY_PROJECT_SELECTED, val)
|
|
|
state.projects.map((item) =>{
|