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
4d483aa9
Commit
4d483aa9
authored
Oct 13, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
cb24acb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
13 deletions
+21
-13
index.html
public/index.html
+5
-5
sparkrc.js
sparkrc.js
+2
-2
app.jsx
src/app.jsx
+14
-6
No files found.
public/index.html
View file @
4d483aa9
...
...
@@ -7,21 +7,21 @@
<meta
name=
"theme-color"
content=
"#000000"
>
<title>
活动标题
</title>
<script
src=
"https://yun.duiba.com.cn/
db_games/debug
/vconsole.min.js"
></script>
<script
src=
"https://yun.duiba.com.cn/
js-libs/vConsole/3.3.4
/vconsole.min.js"
></script>
<script>
// init vConsole
var
vConsole
=
new
VConsole
();
console
.
log
(
'Hello world'
,
334
);
</script>
<
script
src=
"//yun.duiba.com.cn/spark/v2/spark.base.fz.wxpollyfill.js"
></script
>
<
script
src=
"//yun.duiba.com.cn/js-libs/rem/1.1.3/rem.min.js"
></script
>
<
script
src=
"//yun.duiba.com.cn/h5/lib/zepto.min.js"
></script
>
<
!-- <script src="//yun.duiba.com.cn/spark/v2/spark.base.fz.wxpollyfill.js"></script> --
>
<
!-- <script src="//yun.duiba.com.cn/js-libs/rem/1.1.3/rem.min.js"></script> --
>
<
!-- <script src="//yun.duiba.com.cn/h5/lib/zepto.min.js"></script> --
>
<!-- cmblifeSDK -->
<!-- <script src="//yun.duiba.com.cn/aurora/assets/1f77f067b23f29cbab785a417db977b3bde8d809.js"></script> -->
<!-- cmblifeSDK-Dev -->
<
script
src=
"//yun.duiba.com.cn/aurora/assets/a2ea866799a083bc624ed081af653884ad066779.js"
></script
>
<
!-- <script src="//yun.duiba.com.cn/aurora/assets/a2ea866799a083bc624ed081af653884ad066779.js"></script> --
>
<script>
function
getApp
()
{
...
...
sparkrc.js
View file @
4d483aa9
...
...
@@ -9,6 +9,6 @@ module.exports ={
"IMAGE_Q1"
:
0.6
,
"IMAGE_Q2"
:
0.8
,
"RES_PATH"
:
"/src/assets/"
,
"RES_PATH_PROD"
:
"//yun.duiba.com.cn/spark/v2/temp_base/16340
30516856
"
,
"JS_PATH_PROD"
:
"https://yun.duiba.com.cn/spark/v2/temp_base/16340
30519691
/js"
"RES_PATH_PROD"
:
"//yun.duiba.com.cn/spark/v2/temp_base/16340
95516351
"
,
"JS_PATH_PROD"
:
"https://yun.duiba.com.cn/spark/v2/temp_base/16340
95518316
/js"
}
\ No newline at end of file
src/app.jsx
View file @
4d483aa9
...
...
@@ -15,15 +15,22 @@ MD();
class
App
extends
Component
{
async
componentDidMount
()
{
const
url
=
'https://activity-pre.m.duiba.com.cn/projectx/pb4398bdc/index.html?appKey=jlg88lyxz7siqtmr&openBs=openbs&appID=1'
;
const
callBackUrl
=
url
+
'&iscallback=1'
;
const
redirectUrl
=
url
+
'&isredirect=1'
;
const
url
=
'https://activity.m.duibatest.com.cn/projectx/p19dcfe16/index.html'
;
const
callBackUrl
=
url
+
'?iscallback=1'
;
const
redirectUrl
=
url
+
'?isredirect=1'
;
// const url = 'https://activity-pre.m.duiba.com.cn/projectx/pb4398bdc/index.html?appKey=jlg88lyxz7siqtmr&openBs=openbs&appID=1';
// const callBackUrl = url + '&iscallback=1';
// const redirectUrl = url + '&isredirect=1';
let
activityId
=
CFG
.
projectId
;
let
{
iscallback
,
cmbdata
,
isredirect
}
=
queryParams
;
setTimeout
(()
=>
{
console
.
error
(
'queryParams'
,
JSON
.
stringify
(
queryParams
));
console
.
error
(
'cmbdata'
,
decodeURIComponent
(
cmbdata
));
console
.
error
(
'location'
,
location
.
href
);
},
1000
);
if
(
isredirect
)
{
API
.
getLoginUser
({}).
then
(
data
=>
{
...
...
@@ -44,7 +51,7 @@ class App extends Component {
setTimeout
(()
=>
{
console
.
error
(
'generateLoginUrlResult'
,
generateLoginUrlResult
)
},
1000
);
location
.
href
=
generateLoginUrlResult
.
data
;
//
location.href = generateLoginUrlResult.data;
}
else
{
//没有获取到code
...
...
@@ -53,14 +60,15 @@ class App extends Component {
//请求授权协议
// const result = await API.generateApproval({
// activityId: activityId,
// callBackUrl:
callBackUrl
// callBackUrl:
( callBackUrl)
// });
// const protocol = result.data;
const
protocol
=
'cmblife://approval?aid=6b9a76cce8b54060a3a31867c4c9281d&callback=https%3A%2F%2Factivity.m.duibatest.com.cn%2Fprojectx%2Fp19dcfe16%2Findex.html%3Fiscallback%3D1&clientType=h5&date=2021101
2163851&keyAlias=CO_PUB_KEY_SM2&mid=1611e17549f83f6d83c77822d0bf7bef&random=cc8b45de7e90468bb49b17ad8777c427&responseType=code&scope=defaultScope&sign=MEYCIQD5wJvbKbZMymWbeKj2o4FVYGoklcqqt2ShaiM8ty0aEgIhANF7ZTCHulvvkqfMCTaE7o2Ya2TON9YXKv7raukxKkHY
&state=state'
;
const
protocol
=
'cmblife://approval?aid=6b9a76cce8b54060a3a31867c4c9281d&callback=https%3A%2F%2Factivity.m.duibatest.com.cn%2Fprojectx%2Fp19dcfe16%2Findex.html%3Fiscallback%3D1&clientType=h5&date=2021101
3112046&keyAlias=CO_PUB_KEY_SM2&mid=1611e17549f83f6d83c77822d0bf7bef&random=7d11d0cea5ab4ff48dfb276548139494&responseType=code&scope=defaultScope&sign=MEUCIQD439PD%2B%2Fp6WbWA9bvRuBT9X3ErgY%2FbdZEceoJdJYiqyAIgWHMDYFLqh7FG0TMXcw9%2FfMEeabDUV5IW8vqRP2EuCc8%3D
&state=state'
;
setTimeout
(()
=>
{
console
.
error
(
'protocol'
,
protocol
)
},
1000
);
window
.
location
.
href
=
protocol
;
}
}
...
...
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