Ver código fonte

升级ping++

jmx 8 anos atrás
pai
commit
5e265444b2

+ 1 - 0
www/webapp/common/js/native.js

@@ -213,6 +213,7 @@ define(function (require) {
                 },
                 wx: function () {
                     if (config.test) {
+                        console.log(params)
                         pingpp.createPayment(params.charge, function (result, err) {
                             if (result) {
                                 var res = {

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
www/webapp/o2o/dist/js/main.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
www/webapp/o2o/dist/js/native.js


+ 1 - 1
www/webapp/o2o/dist/js/page/pay.js

@@ -1 +1 @@
-define(["$","template","api","native","config","user"],function(e,t,n,r,i,s){function p(){e(document).trigger("spa:navigate",{hash:o,pushData:{dontNeedReload:!0,animate:"slideOutDown"}})}var o,u,a,f=0,l=0,c=0,h=!1;return{title:"壹管家上门服务",body:"",init:function(t,o){function l(e){f.trigger("spa:closeloader");if(e.success){var t=s.getOrderInfo(u),n={orderInfo:t,charge:e.data};r.pay(n,function(e){e.success?f.trigger("spa:navigate",{hash:"paySuccess"}):f.trigger("spa:openpanel",["simpleAlert",{message:e.message}])})}else f.trigger("spa:openpanel",["simpleAlert",{message:e.message}])}var a=this,f=e(document);e.newTouch(".pay-option",function(t){t.preventDefault();var n=e(this).data("value");e(".btn-pay",a).attr("data-pay-channel",n),e(this).addClass("checked").parent().siblings().find("a").removeClass("checked")},a),e.newTouch(".btn-pay",function(t){t.preventDefault();var r=e(this).attr("data-pay-channel");i.isWX&&(r="wx_pub");if(!r)return;f.trigger("spa:openloader");var o={user_id:s.id,order_id:u,pay_channel:r};h?n.payRecharge(o,function(e){l(e)}):n.getPayCharge(o,function(e){l(e)})},a),e.newTouch(".cancel-button",function(e){e.preventDefault(),p.call(this,e)},a),a.on("tapBackButton",function(e){e.preventDefault(),p.call(this,e)}),o.resolve()},beforeopen:function(n,r){console.log("2222222222222222222222");var p=this,d=n.pushData;u=d.orderID,o=d.backHash?d.backHash:"",h=d.isRecharge;var v=s.orders[1].data;for(var m=0,g=v.length;m<g;m++)if(v[m].id==u){var y=v[m];a=y.products[0].product.name;if(y.coupons&&y.coupons.length)for(m in y.coupons)f+=parseInt(y.coupons[m].coupon.value);y.pay_price&&y.pay_price!=0&&(l=y.final_price-y.pay_price),y.pay_price&&y.pay_price!=0?c=y.pay_price:c=y.final_price}var b=t("pay/index",{showNavBar:!i.isWX&&!i.isChubao,wxPub:!0,orderType:a,isRecharge:h,isShow:!h,orderCoupon:f,orderBalance:l,orderPayValue:c});e(".spa-page-body",p).html(b),r.resolve()}}});
+define(["$","template","api","native","config","user"],function(e,t,n,r,i,s){function p(){e(document).trigger("spa:navigate",{hash:o,pushData:{dontNeedReload:!0,animate:"slideOutDown"}})}var o,u,a,f=0,l=0,c=0,h=!1;return{title:"壹管家上门服务",body:"",init:function(t,o){function l(e){f.trigger("spa:closeloader");if(e.success){var t=s.getOrderInfo(u),n={orderInfo:t,charge:e.data};r.pay(n,function(e){e.success?f.trigger("spa:navigate",{hash:"paySuccess"}):f.trigger("spa:openpanel",["simpleAlert",{message:e.message}])})}else f.trigger("spa:openpanel",["simpleAlert",{message:e.message}])}var a=this,f=e(document);e.newTouch(".pay-option",function(t){t.preventDefault();var n=e(this).data("value");e(".btn-pay",a).attr("data-pay-channel",n),e(this).addClass("checked").parent().siblings().find("a").removeClass("checked")},a),e.newTouch(".btn-pay",function(t){t.preventDefault();var r=e(this).attr("data-pay-channel");i.isWX&&(r="wx_pub");if(!r)return;f.trigger("spa:openloader");var o={user_id:s.id,order_id:u,pay_channel:r};h?n.payRecharge(o,function(e){l(e)}):n.getPayCharge(o,function(e){l(e)})},a),e.newTouch(".cancel-button",function(e){e.preventDefault(),p.call(this,e)},a),a.on("tapBackButton",function(e){e.preventDefault(),p.call(this,e)}),o.resolve()},beforeopen:function(n,r){var p=this,d=n.pushData;u=d.orderID,o=d.backHash?d.backHash:"",h=d.isRecharge;var v=s.orders[1].data;for(var m=0,g=v.length;m<g;m++)if(v[m].id==u){var y=v[m];a=y.products[0].product.name;if(y.coupons&&y.coupons.length)for(m in y.coupons)f+=parseInt(y.coupons[m].coupon.value);y.pay_price&&y.pay_price!=0&&(l=y.final_price-y.pay_price),y.pay_price&&y.pay_price!=0?c=y.pay_price:c=y.final_price}var b=t("pay/index",{showNavBar:!i.isWX&&!i.isChubao,wxPub:!0,orderType:a,isRecharge:h,isShow:!h,orderCoupon:f,orderBalance:l,orderPayValue:c});e(".spa-page-body",p).html(b),r.resolve()}}});

+ 1 - 1
www/webapp/o2o/dist/js/page/rechargee.js

@@ -1 +1 @@
-define(["$","template","IScroll","recharge","native","config","user"],function(e,t,n,r,i,s,o){function u(t){t.preventDefault(),e(document).trigger("spa:navigate",{hash:"mine",pushData:{dontNeedReload:!0}})}return{title:"充值卡",body:"",init:function(t,n){var i=this,s=e(document);i.on("swipeRight",function(e){u.call(this,e)}),e.newTouch(".back-button",function(e){u.call(this,e)},i),i.on("tapBackButton",function(e){u.call(this,e)}),e.newTouch(".btn-add-recharge",function(t){t.preventDefault(),s.trigger("spa:openloader");var n=e(this).attr("data-value");r.addRechargeorder({user_id:o.id,recharge_id:e(this).attr("data-id")},function(e){console.log("11111111111111111111"),s.trigger("spa:closeloader"),e.success&&(o.orders[1].data.push({id:e.data._id.$id,products:[{product:{name:"充值"+n+"元"}}],final_price:e.data.price}),s.trigger("spa:navigate",{hash:"pay",pushData:{isRecharge:!0,orderID:e.data._id.$id,backHash:"recharge"}}))})},i),n.resolve()},beforeopen:function(e,t){t.resolve()},afteropen:function(i,o){var u=this,a=e(document);i.pushData.dontNeedReload||(a.trigger("spa:openloader"),r.getRechargeList(function(r){a.trigger("spa:closeloader");if(r.success){var o=t("recharge/index",{showNavBar:!s.isWX,recharges:r.data});e(".spa-page-body",u).html(o),setTimeout(function(){i.scroll=new n("#rechargeScroll")},500)}})),o.resolve()},beforeclose:function(e,t){t.resolve()}}});
+define(["$","template","IScroll","recharge","native","config","user"],function(e,t,n,r,i,s,o){function u(t){t.preventDefault(),e(document).trigger("spa:navigate",{hash:"mine",pushData:{dontNeedReload:!0}})}return{title:"充值卡",body:"",init:function(t,n){var i=this,s=e(document);i.on("swipeRight",function(e){u.call(this,e)}),e.newTouch(".back-button",function(e){u.call(this,e)},i),i.on("tapBackButton",function(e){u.call(this,e)}),e.newTouch(".btn-add-recharge",function(t){t.preventDefault(),s.trigger("spa:openloader");var n=e(this).attr("data-value");r.addRechargeorder({user_id:o.id,recharge_id:e(this).attr("data-id")},function(e){s.trigger("spa:closeloader"),e.success&&(o.orders[1].data.push({id:e.data._id.$id,products:[{product:{name:"充值"+n+"元"}}],final_price:e.data.price}),s.trigger("spa:navigate",{hash:"pay",pushData:{isRecharge:!0,orderID:e.data._id.$id,backHash:"recharge"}}))})},i),n.resolve()},beforeopen:function(e,t){t.resolve()},afteropen:function(i,o){var u=this,a=e(document);i.pushData.dontNeedReload||(a.trigger("spa:openloader"),r.getRechargeList(function(r){a.trigger("spa:closeloader");if(r.success){var o=t("recharge/index",{showNavBar:!s.isWX,recharges:r.data});e(".spa-page-body",u).html(o),setTimeout(function(){i.scroll=new n("#rechargeScroll")},500)}})),o.resolve()},beforeclose:function(e,t){t.resolve()}}});

+ 0 - 1
www/webapp/o2o/js/page/pay.js

@@ -96,7 +96,6 @@ define(['$', 'template', 'api', 'native', 'config', 'user'], function ($, templa
             dtd.resolve();
         },
         beforeopen: function (pageData, dtd) {
-            console.log('2222222222222222222222')
             var $view = this;
             var pushData = pageData.pushData;
             orderID = pushData.orderID;

+ 0 - 1
www/webapp/o2o/js/page/rechargee.js

@@ -44,7 +44,6 @@ define(['$', 'template', 'IScroll', 'recharge', 'native', 'config', 'user'], fun
                     user_id: user.id,
                     recharge_id: $(this).attr('data-id')
                 }, function (res) {
-                    console.log('11111111111111111111')
                     $doc.trigger('spa:closeloader');
                     if (res.success) {
                         // 更新user的订单

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff