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
ff63b546
Commit
ff63b546
authored
Sep 30, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
50e1dcae
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
6 deletions
+58
-6
.DS_Store
.DS_Store
+0
-0
1.html
1.html
+51
-0
sparkrc.js
sparkrc.js
+2
-2
app.jsx
src/app.jsx
+5
-4
No files found.
.DS_Store
View file @
ff63b546
No preview for this file type
1.html
0 → 100644
View file @
ff63b546
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Document
</title>
<script
src=
"https://yun.duiba.com.cn/db_games/debug/vconsole.min.js"
></script>
<script>
// init vConsole
var
vConsole
=
new
VConsole
();
console
.
log
(
'Hello world,204'
);
</script>
</head>
<body>
<script>
function
getQueryVariable
(
variable
)
{
var
query
=
window
.
location
.
search
.
substring
(
1
);
var
vars
=
query
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
var
pair
=
vars
[
i
].
split
(
"="
);
if
(
pair
[
0
]
==
variable
)
{
return
pair
[
1
];
}
}
return
(
false
);
}
</script>
<script>
const
cmbdata
=
getQueryVariable
(
'cmbdata'
);
console
.
log
(
'cmbdata'
,
getQueryVariable
(
'cmbdata'
))
console
.
log
(
'location.href'
,
location
.
href
)
if
(
cmbdata
)
{
}
else
{
const
protocol
=
'cmblife://approval?aid=9dad6d3900ec3ffabd80e46522a10ead&callback=https%3A%2F%2Factivity.m.duiba.com.cn%2FcustomShare%2Fshare%3Fid%3D5369&clientType=h5&date=20210930142411&keyAlias=CO_PUB_KEY_SM2&mid=f806c259d86e3b9aa956c98d475b6af7&random=6d3c20a68d47452b98bf655a7341ad8d&responseType=code&scope=defaultScope&sign=MEUCIFe0gzfuKxtj5nx2Z3THWbI%2BardmzOMHU9UHlwYoBJMpAiEA1WqXdf5XdMsLBvLlnrv%2FGf52qDEXqjGzE3yRClCuofg%3D&state=state'
;
setTimeout
(()
=>
{
window
.
location
.
href
=
protocol
;
},
100
);
}
</script>
</body>
</html>
\ No newline at end of file
sparkrc.js
View file @
ff63b546
...
@@ -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/163298
0913492
"
,
"RES_PATH_PROD"
:
"//yun.duiba.com.cn/spark/v2/temp_base/163298
1807428
"
,
"JS_PATH_PROD"
:
"https://yun.duiba.com.cn/spark/v2/temp_base/163298
0915664
/js"
"JS_PATH_PROD"
:
"https://yun.duiba.com.cn/spark/v2/temp_base/163298
1809441
/js"
}
}
\ No newline at end of file
src/app.jsx
View file @
ff63b546
...
@@ -31,12 +31,13 @@ class App extends Component {
...
@@ -31,12 +31,13 @@ class App extends Component {
// const generateApprovalResult = await API.generateApproval();
// const generateApprovalResult = await API.generateApproval();
// const { protocol } = generateApprovalResult;
// const { protocol } = generateApprovalResult;
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"
+
"?protocol="
+
encodeURIComponent
(
protocol
)
//
+ "?protocol=" + encodeURIComponent(protocol)
+
"&merchantApprovalUrl="
+
encodeURIComponent
(
window
.
location
.
href
);
//
+ "&merchantApprovalUrl=" + encodeURIComponent(window.location.href);
// window.location.href = redirectUr
l;
window
.
location
.
href
=
protoco
l
;
}
}
}
}
...
...
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