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
b98dd038
Commit
b98dd038
authored
Sep 28, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5ed10fad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
index.html
public/index.html
+3
-3
app.jsx
src/app.jsx
+4
-0
No files found.
public/index.html
View file @
b98dd038
...
@@ -35,9 +35,9 @@
...
@@ -35,9 +35,9 @@
}
}
CFG
.
appID
=
'${APPID}'
;
CFG
.
appID
=
'${APPID}'
;
if
(
!
getUrlParam
(
"appID"
))
{
//
if (!getUrlParam("appID")) {
alert
(
"【警告】检测到活动url中没有appID参数
\n
缺少该参数会导致埋点、分享、app信息获取错误。"
)
//
alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
//
}
</script>
</script>
</head>
</head>
...
...
src/app.jsx
View file @
b98dd038
...
@@ -5,6 +5,8 @@ import MD from '../MD';
...
@@ -5,6 +5,8 @@ import MD from '../MD';
import
"../monitor.js"
;
//前端错误监控
import
"../monitor.js"
;
//前端错误监控
import
"./app.less"
;
import
"./app.less"
;
import
Modal
from
'./modal/modal'
;
import
Modal
from
'./modal/modal'
;
import
API
from
'./api/index'
;
MD
();
MD
();
//此处为spark-cli动态生成
//此处为spark-cli动态生成
...
@@ -13,6 +15,7 @@ class App extends Component {
...
@@ -13,6 +15,7 @@ class App extends Component {
async
componentDidMount
()
{
async
componentDidMount
()
{
const
{
code
}
=
queryParams
;
const
{
code
}
=
queryParams
;
if
(
code
)
{
//获取到code
if
(
code
)
{
//获取到code
...
@@ -26,6 +29,7 @@ class App extends Component {
...
@@ -26,6 +29,7 @@ class App extends Component {
//请求授权协议
//请求授权协议
const
generateApprovalResult
=
await
API
.
generateApproval
();
const
generateApprovalResult
=
await
API
.
generateApproval
();
const
{
protocol
}
=
generateApprovalResult
;
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
);
...
...
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