Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
a9a95a1c
Commit
a9a95a1c
authored
Sep 06, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf:修改持久化函数
parent
7c252db5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
base-manager-ui/admin/src/store/index.js
base-manager-ui/admin/src/store/index.js
+2
-2
base-manager-ui/admin/src/utils/util.js
base-manager-ui/admin/src/utils/util.js
+2
-2
portal-manager-ui/admin/src/store/index.js
portal-manager-ui/admin/src/store/index.js
+2
-2
portal-manager-ui/admin/src/utils/index.js
portal-manager-ui/admin/src/utils/index.js
+2
-2
No files found.
base-manager-ui/admin/src/store/index.js
View file @
a9a95a1c
...
@@ -16,8 +16,8 @@ const store = new Vuex.Store({
...
@@ -16,8 +16,8 @@ const store = new Vuex.Store({
createPersistedState
({
createPersistedState
({
key
:
"
info
"
,
key
:
"
info
"
,
storage
:
{
storage
:
{
getItem
:
(
key
)
=>
SessionCrypto
.
get
SS
(
key
),
getItem
:
(
key
)
=>
SessionCrypto
.
get
Item
(
key
),
setItem
:
(
key
,
value
)
=>
SessionCrypto
.
set
SS
(
key
,
value
),
setItem
:
(
key
,
value
)
=>
SessionCrypto
.
set
Item
(
key
,
value
),
removeItem
:
(
key
)
=>
SessionCrypto
.
remove
(
key
),
removeItem
:
(
key
)
=>
SessionCrypto
.
remove
(
key
),
},
},
}),
}),
...
...
base-manager-ui/admin/src/utils/util.js
View file @
a9a95a1c
...
@@ -70,7 +70,7 @@ const aseKey = "**_FXxx_1234_KEY";
...
@@ -70,7 +70,7 @@ const aseKey = "**_FXxx_1234_KEY";
const
KEY
=
"
KEY_EXTRA
"
;
const
KEY
=
"
KEY_EXTRA
"
;
export
class
SessionCrypto
{
export
class
SessionCrypto
{
// 加密
// 加密
static
set
SS
(
key
=
KEY
,
value
=
""
)
{
static
set
Item
(
key
=
KEY
,
value
=
""
)
{
if
(
typeof
key
===
"
string
"
)
{
if
(
typeof
key
===
"
string
"
)
{
const
stringify
=
JSON
.
stringify
(
value
);
const
stringify
=
JSON
.
stringify
(
value
);
const
encrypt
=
CryptoJS
.
AES
.
encrypt
(
const
encrypt
=
CryptoJS
.
AES
.
encrypt
(
...
@@ -86,7 +86,7 @@ export class SessionCrypto {
...
@@ -86,7 +86,7 @@ export class SessionCrypto {
}
}
}
}
// 解密
// 解密
static
get
SS
(
key
=
KEY
)
{
static
get
Item
(
key
=
KEY
)
{
const
ssStr
=
window
.
sessionStorage
.
getItem
(
key
)
||
""
;
const
ssStr
=
window
.
sessionStorage
.
getItem
(
key
)
||
""
;
try
{
try
{
if
(
ssStr
)
{
if
(
ssStr
)
{
...
...
portal-manager-ui/admin/src/store/index.js
View file @
a9a95a1c
...
@@ -17,8 +17,8 @@ const store = new Vuex.Store({
...
@@ -17,8 +17,8 @@ const store = new Vuex.Store({
createPersistedState
({
createPersistedState
({
key
:
"
info
"
,
key
:
"
info
"
,
storage
:
{
storage
:
{
getItem
:
(
key
)
=>
SessionCrypto
.
get
SS
(
key
),
getItem
:
(
key
)
=>
SessionCrypto
.
get
Item
(
key
),
setItem
:
(
key
,
value
)
=>
SessionCrypto
.
set
SS
(
key
,
value
),
setItem
:
(
key
,
value
)
=>
SessionCrypto
.
set
Item
(
key
,
value
),
removeItem
:
(
key
)
=>
SessionCrypto
.
remove
(
key
),
removeItem
:
(
key
)
=>
SessionCrypto
.
remove
(
key
),
},
},
}),
}),
...
...
portal-manager-ui/admin/src/utils/index.js
View file @
a9a95a1c
...
@@ -38,7 +38,7 @@ const aseKey = "**_FXxx_1234_KEY";
...
@@ -38,7 +38,7 @@ const aseKey = "**_FXxx_1234_KEY";
const
KEY
=
"
KEY_EXTRA
"
;
const
KEY
=
"
KEY_EXTRA
"
;
export
class
SessionCrypto
{
export
class
SessionCrypto
{
// 加密
// 加密
static
set
SS
(
key
=
KEY
,
value
=
""
)
{
static
set
Item
(
key
=
KEY
,
value
=
""
)
{
if
(
typeof
key
===
"
string
"
)
{
if
(
typeof
key
===
"
string
"
)
{
const
stringify
=
JSON
.
stringify
(
value
);
const
stringify
=
JSON
.
stringify
(
value
);
const
encrypt
=
CryptoJS
.
AES
.
encrypt
(
const
encrypt
=
CryptoJS
.
AES
.
encrypt
(
...
@@ -54,7 +54,7 @@ export class SessionCrypto {
...
@@ -54,7 +54,7 @@ export class SessionCrypto {
}
}
}
}
// 解密
// 解密
static
get
SS
(
key
=
KEY
)
{
static
get
Item
(
key
=
KEY
)
{
const
ssStr
=
window
.
sessionStorage
.
getItem
(
key
)
||
""
;
const
ssStr
=
window
.
sessionStorage
.
getItem
(
key
)
||
""
;
try
{
try
{
if
(
ssStr
)
{
if
(
ssStr
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment