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
bcf836c1
Commit
bcf836c1
authored
Dec 06, 2024
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 集成登录添加自定义第三方鉴权再跳转
parent
cb316db1
Pipeline
#94442
passed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
22 deletions
+56
-22
index.js
src/pages/bootpage/template/integrationNew/index.js
+28
-11
index.js
src/pages/bootpage/template/project/qinzhou/index.js
+27
-10
AddModal.js
src/pages/integratedLogin/components/AddModal.js
+1
-1
No files found.
src/pages/bootpage/template/integrationNew/index.js
View file @
bcf836c1
...
@@ -244,22 +244,38 @@ const IntegrationNew = props => {
...
@@ -244,22 +244,38 @@ const IntegrationNew = props => {
toClient(item, loginA);
toClient(item, loginA);
} else {
} else {
if (!url) return;
if (!url) return;
if (url?.indexOf('{userId}') >= 0) {
item.url = url.replace('{userId}', window.globalConfig?.userInfo?.OID);
}
let link = item.url;
if (item.paramName) {
link = `
$
{
item
.
url
+
(
item
.
url
.
indexOf
(
'?'
)
>
0
?
'&'
:
'?'
)
+
item
.
paramName
}
=
$
{
window
.
globalConfig
?.
token
}
`;
}
if (item.subType === '外链') {
if (item.subType === '外链') {
if (item.paramValue === 'ticket') {
if (item.paramValue === 'ticket') {
toRevenue(item); // 去营收
toRevenue(item); // 去营收
return;
return;
}
}
if (item?.openOpt === '当前页打开') {
props.history.push('/thirdParty', { linkUrl: url });
} else {
window.open(url, '_blank');
}
return;
}
}
const link = `
$
{
item
.
url
+
(
item
.
url
.
indexOf
(
'?'
)
>
0
?
'&'
:
'?'
)
+
item
.
paramName
}
=
$
{
axios({
window
.
globalConfig
?.
token
url: link,
}
`;
method: 'get',
if (item?.openOpt === '当前页打开') {
dataType: 'json',
props.history.push('/thirdParty', { linkUrl: link });
}).then(res => {
} else {
if (res?.data?.code === 0) {
setJumpLoading(false);
if (item?.openOpt === '当前页打开') {
jumpProgressEnd();
props.history.push('/thirdParty', { linkUrl: res.data?.data });
window.open(link, '_blank');
} else {
}
window.open(res.data?.data, '_blank');
}
}
});
}
}
};
};
...
@@ -291,9 +307,10 @@ const IntegrationNew = props => {
...
@@ -291,9 +307,10 @@ const IntegrationNew = props => {
9: [5, 4],
9: [5, 4],
10: [5, 5],
10: [5, 5],
};
};
const arr = rowMap[integrationData.length];
const arr = rowMap[integrationData.length]
|| rowMap[10]
;
const temp = [];
const temp = [];
integrationData.forEach((i, index) => {
integrationData.forEach((i, index) => {
if (index >= 10) return;
if (index < arr[0]) {
if (index < arr[0]) {
if (!temp[0]) temp[0] = [];
if (!temp[0]) temp[0] = [];
temp[0].push(i);
temp[0].push(i);
...
...
src/pages/bootpage/template/project/qinzhou/index.js
View file @
bcf836c1
...
@@ -250,22 +250,39 @@ const IntegrationQinzhou = props => {
...
@@ -250,22 +250,39 @@ const IntegrationQinzhou = props => {
toClient(item, loginA);
toClient(item, loginA);
} else {
} else {
if (!url) return;
if (!url) return;
if (url?.indexOf('{userId}') >= 0) {
item.url = url.replace('{userId}', window.globalConfig?.userInfo?.OID);
}
let link = item.url;
if (item.paramName) {
link = `
$
{
item
.
url
+
(
item
.
url
.
indexOf
(
'?'
)
>
0
?
'&'
:
'?'
)
+
item
.
paramName
}
=
$
{
window
.
globalConfig
?.
token
}
`;
}
if (item.subType === '外链') {
if (item.subType === '外链') {
if (item.paramValue === 'ticket') {
if (item.paramValue === 'ticket') {
toRevenue(item); // 去营收
toRevenue(item); // 去营收
return;
return;
}
}
if (item?.openOpt === '当前页打开') {
props.history.push('/thirdParty', { linkUrl: url });
} else {
window.open(url, '_blank');
}
return;
}
}
const link = `
$
{
item
.
url
+
(
item
.
url
.
indexOf
(
'?'
)
>
0
?
'&'
:
'?'
)
+
item
.
paramName
}
=
$
{
axios({
window
.
globalConfig
?.
token
url: link,
}
`;
method: 'get',
if (item?.openOpt === '当前页打开') {
dataType: 'json',
props.history.push('/thirdParty', { linkUrl: link });
}).then(res => {
} else {
if (res?.data?.code === 0) {
setJumpLoading(false);
if (item?.openOpt === '当前页打开') {
jumpProgressEnd();
props.history.push('/thirdParty', { linkUrl: res.data?.data });
window.open(link, '_blank');
} else {
}
window.open(res.data?.data, '_blank');
}
}
});
}
}
};
};
...
...
src/pages/integratedLogin/components/AddModal.js
View file @
bcf836c1
...
@@ -566,7 +566,7 @@ const AddModal = props => {
...
@@ -566,7 +566,7 @@ const AddModal = props => {
<
Radio
.
Group
onChange
=
{
onChangeSubType
}
>
<
Radio
.
Group
onChange
=
{
onChangeSubType
}
>
<
Radio
value
=
"内链"
>
站内跳转
<
/Radio
>
<
Radio
value
=
"内链"
>
站内跳转
<
/Radio
>
<
Radio
value
=
"外链"
>
站外跳转
<
/Radio
>
<
Radio
value
=
"外链"
>
站外跳转
<
/Radio
>
{
/* <Radio value="自定义">自定义</Radio>
*/
}
<
Radio
value
=
"自定义"
>
自定义
<
/Radio> {/
*
第三方鉴权选自定义,通过接口返回路径再跳转
*
/
}
<
/Radio.Group
>
<
/Radio.Group
>
<
/Item
>
<
/Item
>
{
subTypes
!==
'内链'
?
(
{
subTypes
!==
'内链'
?
(
...
...
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