Commit 250935c6 by sunchao

微信中支付宝支付调试

parent 8a715d74
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
"statusbar" : { "statusbar" : {
"immersed" : false "immersed" : false
}, },
"compatible" :{ "compatible" : {
"ignoreVersion": true "ignoreVersion" : true
}, },
"usingComponents" : true, "usingComponents" : true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler" : "uni-app",
......
...@@ -157,7 +157,9 @@ ...@@ -157,7 +157,9 @@
contentType:'', contentType:'',
payForm:'', payForm:'',
deviceType:'', deviceType:'',
tipsFlag:false tipsFlag:false,
isRedirect:null,
amount:0
} }
}, },
computed:{ computed:{
...@@ -257,9 +259,11 @@ ...@@ -257,9 +259,11 @@
//#ifdef H5 //#ifdef H5
//支付宝h5支付 //支付宝h5支付
param.paymentType = 2; param.paymentType = 2;
this.amount = this.totalPrice;
if(this.deviceType == 3){ if(this.deviceType == 3){
this.tipsFlag = true; this.tipsFlag = true;
let url = window.location.href + '&isRedirect=1'; this.paymentBtnDisabled = false;
let url = window.location.href + `&isRedirect=1&userId=${this.userId}&amount=${this.amount}`;
window.history.replaceState(null, '',url); window.history.replaceState(null, '',url);
return; return;
} }
...@@ -358,12 +362,20 @@ ...@@ -358,12 +362,20 @@
this.courseDetail(); this.courseDetail();
this.queryByUserIdFortuneStatistic() this.queryByUserIdFortuneStatistic()
this.deviceType = common.checkDeviceType(); this.deviceType = common.checkDeviceType();
if(option.isRedirect == 1){ this.isRedirect = option.isRedirect;
if(this.isRedirect == 1){
if(option.amount){
this.amount = option.amount;
}
console.log(this.amount)
this.totalPrice = this.amount;
console.log(this.totalPrice);
setTimeout(()=>{
this.pay(); this.pay();
},500)
} }
}, },
mounted() { mounted() {
} }
} }
</script> </script>
......
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