Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
ReactWeb5
CivWeb
Commits
9136dfd9
Commit
9136dfd9
authored
1 year ago
by
徐乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增跳转第三方链接功能
parent
402d6c0c
Pipeline
#83504
waiting for manual action with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
JumpThirdLink.js
src/pages/system/iframe/JumpThirdLink.js
+19
-0
config.js
src/routes/config.js
+4
-0
No files found.
src/pages/system/iframe/JumpThirdLink.js
0 → 100644
View file @
9136dfd9
import
React
,
{
useEffect
,
useState
}
from
'react'
;
const
JumpThirdLink
=
props
=>
{
let
linkUrl
=
props
.
params
.
linkUrl
||
''
;
console
.
log
(
'linkUrl'
,
linkUrl
)
useEffect
(()
=>
{
if
(
linkUrl
)
{
console
.
log
(
'linkUrl'
,
linkUrl
)
window
.
open
(
linkUrl
,
'_blank'
);
}
},
[]);
return
(
<
div
><
/div
>
);
};
export
default
JumpThirdLink
;
This diff is collapsed.
Click to expand it.
src/routes/config.js
View file @
9136dfd9
...
@@ -13,6 +13,7 @@ import Login from '../pages/user/login';
...
@@ -13,6 +13,7 @@ import Login from '../pages/user/login';
import
NoSecret
from
'../pages/user/login/noSecret'
;
import
NoSecret
from
'../pages/user/login/noSecret'
;
import
Notifications
from
'../pages/system/notifications'
;
import
Notifications
from
'../pages/system/notifications'
;
import
TabIframe
from
'../pages/system/iframe/TabWidget'
;
import
TabIframe
from
'../pages/system/iframe/TabWidget'
;
import
JumpThirdLink
from
'../pages/system/iframe/JumpThirdLink'
;
import
IntegratedLogin
from
'../pages/system/iframe/IntegratedLogin'
;
import
IntegratedLogin
from
'../pages/system/iframe/IntegratedLogin'
;
import
PrevieView
from
'../pages/system/previews/preview'
;
import
PrevieView
from
'../pages/system/previews/preview'
;
...
@@ -95,6 +96,9 @@ export const dyRoutes = (routes, layout, theme) => {
...
@@ -95,6 +96,9 @@ export const dyRoutes = (routes, layout, theme) => {
path
:
'/'
,
path
:
'/'
,
render
:
({
routeConfig
})
=>
{
render
:
({
routeConfig
})
=>
{
const
{
path
}
=
routeConfig
||
{};
const
{
path
}
=
routeConfig
||
{};
if
(
/system
\/
iframe
\/
JumpThirdLink/
.
test
(
path
))
{
return
<
JumpThirdLink
{...
routeConfig
}
/>
;
}
if
(
/system
\/
iframe
\/
tabWidget/
.
test
(
path
))
{
if
(
/system
\/
iframe
\/
tabWidget/
.
test
(
path
))
{
return
<
TabIframe
{...
routeConfig
}
/>
;
return
<
TabIframe
{...
routeConfig
}
/>
;
}
}
...
...
This diff is collapsed.
Click to expand it.
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