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
3522a65f
Commit
3522a65f
authored
Oct 08, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5970bed1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
8 deletions
+14
-8
.DS_Store
.DS_Store
+0
-0
index.html
public/index.html
+1
-1
sparkrc.js
sparkrc.js
+2
-2
app.jsx
src/app.jsx
+11
-5
No files found.
.DS_Store
View file @
3522a65f
No preview for this file type
public/index.html
View file @
3522a65f
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<script>
<script>
// init vConsole
// init vConsole
var
vConsole
=
new
VConsole
();
var
vConsole
=
new
VConsole
();
console
.
log
(
'Hello world'
);
console
.
log
(
'Hello world'
,
334
);
</script>
</script>
<script
src=
"//yun.duiba.com.cn/spark/v2/spark.base.fz.wxpollyfill.js"
></script>
<script
src=
"//yun.duiba.com.cn/spark/v2/spark.base.fz.wxpollyfill.js"
></script>
...
...
sparkrc.js
View file @
3522a65f
...
@@ -9,6 +9,6 @@ module.exports ={
...
@@ -9,6 +9,6 @@ module.exports ={
"IMAGE_Q1"
:
0.6
,
"IMAGE_Q1"
:
0.6
,
"IMAGE_Q2"
:
0.8
,
"IMAGE_Q2"
:
0.8
,
"RES_PATH"
:
"/src/assets/"
,
"RES_PATH"
:
"/src/assets/"
,
"RES_PATH_PROD"
:
"//yun.duiba.com.cn/spark/v2/temp_base/16336
61056961
"
,
"RES_PATH_PROD"
:
"//yun.duiba.com.cn/spark/v2/temp_base/16336
79631882
"
,
"JS_PATH_PROD"
:
"https://yun.duiba.com.cn/spark/v2/temp_base/16336
61059712
/js"
"JS_PATH_PROD"
:
"https://yun.duiba.com.cn/spark/v2/temp_base/16336
79633903
/js"
}
}
\ No newline at end of file
src/app.jsx
View file @
3522a65f
...
@@ -14,22 +14,28 @@ MD();
...
@@ -14,22 +14,28 @@ MD();
class
App
extends
Component
{
class
App
extends
Component
{
async
componentDidMount
()
{
async
componentDidMount
()
{
const
{
code
}
=
queryParams
;
let
activityId
=
CFG
.
projectId
;
const
{
code
,
testact
}
=
queryParams
;
if
(
testact
==
1
)
activityId
=
1
;
if
(
code
)
{
//获取到code
if
(
code
)
{
//获取到code
const
generateLoginUrlResult
=
await
API
.
generateLoginUrl
({
const
generateLoginUrlResult
=
await
API
.
generateLoginUrl
({
redirectUrl
:
""
,
redirectUrl
:
""
,
cmbData
:
code
,
cmbData
:
code
,
activityId
:
CFG
.
project
Id
activityId
:
activity
Id
});
});
// location.href = generateLoginUrlResult.data;
// location.href = generateLoginUrlResult.data;
}
else
{
//没有获取到code
}
else
{
//没有获取到code
//请求授权协议
//请求授权协议
const
generateApprovalResult
=
await
API
.
generateApproval
({
activityId
:
CFG
.
projectId
});
const
result
=
await
API
.
generateApproval
({
activityId
:
activityId
});
const
{
protocol
}
=
generateApprovalResult
;
const
protocol
=
result
.
data
;
setTimeout
(()
=>
{
console
.
error
(
'protocol'
,
protocol
)
},
1000
);
// console.error(202)
// 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';
// 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';
// var redirectUrl = "https://open.cmbchina.com/DevEnv/redirect/auth"
// var redirectUrl = "https://open.cmbchina.com/DevEnv/redirect/auth"
...
...
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