Browse Source

9块9年卡对接ios支付

huangxiaojing 2 years ago
parent
commit
059d5ca9c4
1 changed files with 5 additions and 1 deletions
  1. 5 1
      pages/activity/lottery/index.vue

+ 5 - 1
pages/activity/lottery/index.vue

@@ -203,7 +203,11 @@ export default {
           window.native.startPay(this.payType === 'aliPay' ? 3 : 2, res.data.myOrderNum, 1);
         }
         if (this.$userAgent.isIos) {
-          // window.native.startPay(1, res.data.myOrderNum, 1);
+          window.webkit.messageHandlers.startPay.postMessage({
+            payType: this.payType === 'aliPay' ? 3 : 2,
+            orderNum: res.data.myOrderNum,
+            actualPrice: this.actualPrice
+          });
         }
       } catch (error) {
         Toast({