Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cmb_auth
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
cmb_auth
Commits
713f1b91
Commit
713f1b91
authored
Oct 08, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
4a6dd2e0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
app.jsx
src/app.jsx
+10
-5
No files found.
src/app.jsx
View file @
713f1b91
...
...
@@ -15,26 +15,31 @@ class App extends Component {
async
componentDidMount
()
{
const
callBackUrl
=
'http%3A%2F%2Factivity.m.duibatest.com.cn%2Fprojectx%2Fp19dcfe16%2Findex.html'
;
let
activityId
=
CFG
.
projectId
;
const
{
code
,
testact
}
=
queryParams
;
if
(
testact
==
1
)
activityId
=
1
;
if
(
testact
==
1
)
activityId
=
1
;
if
(
code
)
{
//获取到code
const
generateLoginUrlResult
=
await
API
.
generateLoginUrl
({
redirectUrl
:
""
,
cmbData
:
code
,
activityId
:
activityId
activityId
:
activityId
,
callBackUrl
:
callBackUrl
});
// location.href = generateLoginUrlResult.data;
}
else
{
//没有获取到code
//请求授权协议
const
result
=
await
API
.
generateApproval
({
activityId
:
activityId
});
const
result
=
await
API
.
generateApproval
({
activityId
:
activityId
,
callBackUrl
:
callBackUrl
});
const
protocol
=
result
.
data
;
setTimeout
(()
=>
{
console
.
error
(
'protocol'
,
protocol
)
console
.
error
(
'protocol'
,
protocol
)
},
1000
);
// console.error(202)
// const protocol = 'cmblife://approval?aid=9dad6d3900ec3ffabd80e46522a10ead&callback=https%3A%2F%2Ftest.com%2Fmerchant%2FapprovalCallback.html&clientType=h5&date=20210930134315&keyAlias=CO_PUB_KEY_SM2&mid=f806c259d86e3b9aa956c98d475b6af7&random=6d5e7923308d489b969376cdb448072c&responseType=code&scope=defaultScope&sign=MEUCICIfC6OJFUUHYAIKlswzWvy2H%2BCPSyebZLb48OoTdqRaAiEA6UlFWD2Qd6OHBC0Cd69kFuu8%2FplOiddP%2FCcdokhPPoE%3D&state=state';
...
...
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