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 @@
}
CFG
.
appID
=
'${APPID}'
;
if
(
!
getUrlParam
(
"appID"
))
{
alert
(
"【警告】检测到活动url中没有appID参数
\n
缺少该参数会导致埋点、分享、app信息获取错误。"
)
}
//
if (!getUrlParam("appID")) {
//
alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
//
}
</script>
</head>
...
...
src/app.jsx
View file @
b98dd038
...
...
@@ -5,6 +5,8 @@ import MD from '../MD';
import
"../monitor.js"
;
//前端错误监控
import
"./app.less"
;
import
Modal
from
'./modal/modal'
;
import
API
from
'./api/index'
;
MD
();
//此处为spark-cli动态生成
...
...
@@ -13,6 +15,7 @@ class App extends Component {
async
componentDidMount
()
{
const
{
code
}
=
queryParams
;
if
(
code
)
{
//获取到code
...
...
@@ -26,6 +29,7 @@ class App extends Component {
//请求授权协议
const
generateApprovalResult
=
await
API
.
generateApproval
();
const
{
protocol
}
=
generateApprovalResult
;
var
redirectUrl
=
"https://open.cmbchina.com/DevEnv/redirect/auth"
+
"?protocol="
+
encodeURIComponent
(
protocol
)
+
"&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