Commit 3522a65f authored by wildfirecode13's avatar wildfirecode13

1

parent 5970bed1
No preview for this file type
......@@ -11,7 +11,7 @@
<script>
// init vConsole
var vConsole = new VConsole();
console.log('Hello world');
console.log('Hello world',334);
</script>
<script src="//yun.duiba.com.cn/spark/v2/spark.base.fz.wxpollyfill.js"></script>
......
......@@ -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/1633661056961",
"JS_PATH_PROD": "https://yun.duiba.com.cn/spark/v2/temp_base/1633661059712/js"
"RES_PATH_PROD": "//yun.duiba.com.cn/spark/v2/temp_base/1633679631882",
"JS_PATH_PROD": "https://yun.duiba.com.cn/spark/v2/temp_base/1633679633903/js"
}
\ No newline at end of file
......@@ -14,22 +14,28 @@ MD();
class App extends Component {
async componentDidMount() {
const { code } = queryParams;
let activityId = CFG.projectId;
const { code, testact } = queryParams;
if(testact==1)activityId=1;
if (code) { //获取到code
const generateLoginUrlResult = await API.generateLoginUrl({
redirectUrl: "",
cmbData: code,
activityId:CFG.projectId
activityId:activityId
});
// location.href = generateLoginUrlResult.data;
} else { //没有获取到code
//请求授权协议
const generateApprovalResult = await API.generateApproval({activityId:CFG.projectId});
const { protocol } = generateApprovalResult;
const result = await API.generateApproval({activityId:activityId});
const protocol = result.data;
setTimeout(() => {
console.error('protocol',protocol)
}, 1000);
// 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';
// var redirectUrl = "https://open.cmbchina.com/DevEnv/redirect/auth"
......
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