Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
quantum-blocks
Commits
4790eb33
Commit
4790eb33
authored
May 06, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 保存导航配置时,使用到的活动页面及导航页面,将引用的量子积木页面redis缓存清除
parent
16dee247
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
editor.ts
app/controller/editor.ts
+1
-1
navigator.ts
app/controller/navigator.ts
+10
-0
No files found.
app/controller/editor.ts
View file @
4790eb33
...
...
@@ -104,7 +104,7 @@ export default class EditorController extends Controller {
const
where
=
{
updated_at
:
{
[
ctx
.
model
.
Sequelize
.
Op
.
lt
]:
Date
.
now
(),
[
ctx
.
model
.
Sequelize
.
Op
.
gt
]:
new
Date
(
Date
.
now
()
-
1000
*
60
*
60
*
24
*
7
)
[
ctx
.
model
.
Sequelize
.
Op
.
gt
]:
new
Date
(
Date
.
now
()
-
1000
*
60
*
60
*
24
*
365
)
},
tenantId
:
ctx
.
headers
[
'
qg-tenant-id
'
],
enable
:
1
,
...
...
app/controller/navigator.ts
View file @
4790eb33
...
...
@@ -47,6 +47,16 @@ export default class NavigatorController extends Controller {
delete
pageInfo
.
id
;
}
try
{
for
(
let
i
=
0
;
i
<
pageInfo
.
navigatorData
.
length
;
i
++
)
{
let
item
=
pageInfo
.
navigatorData
[
i
];
if
(
item
.
pageType
!=
1
)
{
let
url
=
new
URL
(
item
.
pageUrl
);
let
pageUUID
=
url
.
pathname
.
replace
(
'
/activity/
'
,
''
);
await
ctx
.
service
.
redis
.
del
(
`page:
${
pageUUID
}
`
);
await
ctx
.
service
.
redis
.
del
(
`pageInfo:
${
pageUUID
}
`
);
ctx
.
logger
.
info
(
`del redis page key page:
${
pageUUID
}
`
);
}
}
await
ctx
.
service
.
navigator
.
saveOrUpdate
(
pageInfo
);
ctx
.
body
=
ctx
.
helper
.
ok
({});
}
catch
(
e
)
{
...
...
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