Commit b98dd038 authored by wildfirecode13's avatar wildfirecode13

1

parent 5ed10fad
...@@ -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>
......
...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment