浏览代码

微信H5 支付

zhengjinyi 3 年之前
父节点
当前提交
63f22135da

+ 30 - 20
src/main/resources/static/js/pay/caimei-wechatpay.js

@@ -53,30 +53,40 @@ var payContainer = new Vue({
         },
         hlbWechatPayFn:function () {// 合利宝
             console.log('=========>合利宝')
-            if (this.pageType == 1) {// 二手
-                this.hlb_WxRequestsecondHandPay();
-            } else if (this.pageType == 2) {
-                this.hlb_WxRequestPaymentVipFn();
-            } else if (this.pageType == 3) {
-                this.hlb_WxRequestPaymentCouponFn();
-            } else if (this.pageType === 4){
-                this.hlb_WxRequestPaymentAuthVipFn();
-            } else {
-                this.hlb_WxRequestPaymentFn();
+            switch (this.pageType) {
+                case 1:// 二手
+                    this.hlb_WxRequestsecondHandPay();
+                    break;
+                case 2:// 超级会员
+                    this.hlb_WxRequestPaymentVipFn();
+                    break;
+                case 3:// 优惠券
+                    this.hlb_WxRequestPaymentCouponFn();
+                    break;
+                case 4:// 认证通会员
+                    this.hlb_WxRequestPaymentAuthVipFn();
+                    break;
+                default:// 订单
+                    this.hlb_WxRequestPaymentFn();
             }
         },
         mhWechatPayFn:function () {// 米花
             console.log('=========>米花')
-            if (this.pageType == 1) {
-                this.mh_WxRequestsecondHandPay();
-            } else if (this.pageType == 2) {
-                this.mh_WxRequestPaymentVipFn();
-            } else if (this.pageType == 3) {
-                this.mh_WxRequestPaymentCouponFn();
-            } else if (this.pageType === 4){
-                this.mh_WxRequestPaymentAuthVipFn();
-            } else {
-                this.mh_WxRequestPaymentFn();
+            switch (this.pageType) {
+                case 1:// 二手
+                    this.mh_WxRequestsecondHandPay();
+                    break;
+                case 2:// 超级会员
+                    this.mh_WxRequestPaymentVipFn();
+                    break;
+                case 3:// 优惠券
+                    this.mh_WxRequestPaymentCouponFn();
+                    break;
+                case 4:// 认证通会员
+                    this.mh_WxRequestPaymentAuthVipFn();
+                    break;
+                default:// 订单
+                    this.mh_WxRequestPaymentFn();
             }
         },
         rand:function (min,max) {//随机数

+ 1 - 1
src/main/resources/static/js/pay/mixin/hlb_payMixin.js

@@ -200,7 +200,7 @@ var hlbPayMixin = function () {// 合利宝支付渠道
 				PayApi.PayVipPcMallPay(params, function (response) {
 					if (response.code == 0) {
 						_this.isPayAlert = true;
-						_this.iframe = response.data
+						_this.iframe = response.data;
 						_this.$nextTick(() => {
 							var onlineForm = document.getElementById('onlineForm');
 							onlineForm.setAttribute('target', '_blank')