|
|
@@ -52,6 +52,7 @@
|
|
|
立即支付
|
|
|
</van-button>
|
|
|
</div>
|
|
|
+ <a id="pay" :href="hrefUrl"></a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -96,7 +97,8 @@ export default {
|
|
|
inApp,
|
|
|
couponList: [],
|
|
|
collectionId: 0,
|
|
|
- timer: null
|
|
|
+ timer: null,
|
|
|
+ hrefUrl: ''
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -218,10 +220,14 @@ export default {
|
|
|
this.$http
|
|
|
.get(`/payOrder/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${res.id}`)
|
|
|
.then(res => {
|
|
|
- window.open(
|
|
|
- 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res,
|
|
|
- '_blank'
|
|
|
- );
|
|
|
+ this.hrefUrl = 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res;
|
|
|
+ // window.open(
|
|
|
+ // 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res,
|
|
|
+ // '_blank'
|
|
|
+ // );
|
|
|
+ this.$nextTick(() => {
|
|
|
+ document.getElementById('pay').click();
|
|
|
+ });
|
|
|
if (!this.inApp) {
|
|
|
this.getOrder(true);
|
|
|
}
|