Browse Source

活动产品

jmx 8 năm trước cách đây
mục cha
commit
e75615e754
2 tập tin đã thay đổi với 16 bổ sung16 xóa
  1. 15 14
      www/webapp/common/js/native.js
  2. 1 2
      www/webapp/o2o/module/pay/index.html

+ 15 - 14
www/webapp/common/js/native.js

@@ -212,20 +212,21 @@ define(function (require) {
                     window.location.href = 'http://callclient?method=pay&param=' + encodeURIComponent(param_str) + '&callback=' + _callback;
                 },
                 wx: function () {
-                    // if (config.test) {
-                    //     console.log(params)
-                    //     pingpp.createPayment(params.charge, function (result, err) {
-                    //         if (result) {
-                    //             var res = {
-                    //                 success: true
-                    //             };
-                    //             callback(res);
-                    //         }
-                    //         if (err) {
-                    //             console.log(err);
-                    //         }
-                    //     });
-                    // }
+                    console.log(config.test);
+                    if (config.test) {
+                        console.log(params)
+                        pingpp.createPayment(params.charge, function (result, err) {
+                            if (result) {
+                                var res = {
+                                    success: true
+                                };
+                                callback(res);
+                            }
+                            if (err) {
+                                console.log(err);
+                            }
+                        });
+                    }
                     var option = params['charge'].credential.wx_pub;
                     var prepay = option["package"].replace('prepay_id=', '');
                     var bookingTime = params.orderInfo.booking_time_str;

+ 1 - 2
www/webapp/o2o/module/pay/index.html

@@ -162,7 +162,6 @@
             "timeStamp": urlParam.timeStamp.toString(),
             "paySign": urlParam.paySign
           },function(res){
-            console.log(res);
             if(res.err_msg == "get_brand_wcpay_request:ok" ) {
               $('.j-pay-btn').hide();
               $('.j-pay-result').show();
@@ -171,7 +170,7 @@
                 // alert('取消支付');
             } else {
               alert('支付失败');
-//              location.href = '/o2o/web/index';
+              location.href = '/o2o/web/index';
             }
           }
         );