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
629cff7d
Commit
629cff7d
authored
Jun 29, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修复因node版本导致url解析的问题
parent
5e918333
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
navigator.ts
app/controller/navigator.ts
+6
-3
No files found.
app/controller/navigator.ts
View file @
629cff7d
import
{
Controller
,
Context
}
from
'
egg
'
;
import
{
Controller
,
Context
}
from
'
egg
'
;
const
url
=
require
(
'
url
'
);
export
default
class
NavigatorController
extends
Controller
{
export
default
class
NavigatorController
extends
Controller
{
public
async
getNavigatorConfigList
(
ctx
:
Context
)
{
public
async
getNavigatorConfigList
(
ctx
:
Context
)
{
// 查询导航配置列表
// 查询导航配置列表
...
@@ -50,8 +50,11 @@ export default class NavigatorController extends Controller {
...
@@ -50,8 +50,11 @@ export default class NavigatorController extends Controller {
for
(
let
i
=
0
;
i
<
pageInfo
.
navigatorData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
pageInfo
.
navigatorData
.
length
;
i
++
)
{
let
item
=
pageInfo
.
navigatorData
[
i
];
let
item
=
pageInfo
.
navigatorData
[
i
];
if
(
item
.
pageType
!=
1
)
{
if
(
item
.
pageType
!=
1
)
{
let
url
=
new
URL
(
item
.
pageUrl
);
// let url = new URL(item.pageUrl);
let
pageUUID
=
url
.
pathname
.
replace
(
'
/activity/
'
,
''
);
let
urlObj
=
url
.
parse
(
item
.
pageUrl
,
true
)
let
pageUUID
=
urlObj
.
pathname
.
replace
(
'
/activity/
'
,
''
);
console
.
log
(
pageUUID
);
await
ctx
.
service
.
redis
.
del
(
`page:
${
pageUUID
}
`
);
await
ctx
.
service
.
redis
.
del
(
`page:
${
pageUUID
}
`
);
await
ctx
.
service
.
redis
.
del
(
`pageInfo:
${
pageUUID
}
`
);
await
ctx
.
service
.
redis
.
del
(
`pageInfo:
${
pageUUID
}
`
);
ctx
.
logger
.
info
(
`del redis page key page:
${
pageUUID
}
`
);
ctx
.
logger
.
info
(
`del redis page key page:
${
pageUUID
}
`
);
...
...
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