diff --git a/app.js b/app.js index 36d5836..a6b002c 100644 --- a/app.js +++ b/app.js @@ -1319,6 +1319,17 @@ App({ th.goto(url); }) + }, + + //-- 如果是新会员没有地址的时候,自提的时候可以不用管 -- + is_no_addr(th,exp_type){ + exp_type=parseInt(exp_type+''); + if ( [0,2].indexOf(exp_type)>-1 && th.data.user_addr == null) { + th.setData({ submit: 0}); + return true; + } + return false; + } }); diff --git a/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js b/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js index 493072b..1b1a6d6 100644 --- a/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js +++ b/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js @@ -2324,7 +2324,8 @@ Page({ //------------立即购买------------- if (th.data.is_b_now == 1 && th.data.bn_goods.prom_type != 5) { - if (th.data.bn_exp_type == 0 && th.data.user_addr == null) { + //if (th.data.bn_exp_type == 0 && th.data.user_addr == null) { + if(getApp().is_no_addr(th,th.data.bn_exp_type)){ ff = false; getApp().my_warnning("请选择收货地址", 0, th); th.data.is_summit_ing = 0; diff --git a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js index 793680d..9866ddd 100644 --- a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js +++ b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js @@ -1195,7 +1195,8 @@ Page({ // console.log("buy_new"); //如果不是阶梯团,或者是普通购买,商家选择了物流,以及地址为空的时候 - if (th.data.bn_exp_type == 0 && th.data.user_addr == null && (th.data.kt_type != 3 || th.data.bn_goods.is_normal == + //if (th.data.bn_exp_type == 0 && th.data.user_addr == null + if (getApp().is_no_addr(th,th.data.bn_exp_type) && (th.data.kt_type != 3 || th.data.bn_goods.is_normal == 1)) { ff = false; getApp().my_warnning("请选择收货地址", 0, this); diff --git a/packageC/pages/payForAnother/payForAnother.js b/packageC/pages/payForAnother/payForAnother.js index 0391023..a70472d 100644 --- a/packageC/pages/payForAnother/payForAnother.js +++ b/packageC/pages/payForAnother/payForAnother.js @@ -2038,7 +2038,8 @@ Page({ //------------立即购买------------- if (th.data.is_b_now == 1 && th.data.bn_goods.prom_type != 5) { - if (th.data.bn_exp_type == 0 && th.data.user_addr == null) { + //if (th.data.bn_exp_type == 0 && th.data.user_addr == null) { + if(getApp().is_no_addr(th,th.data.bn_exp_type)){ ff = false; getApp().my_warnning("请选择收货地址", 0, th); th.data.is_summit_ing = 0; diff --git a/packageC/pages/presell/cart/cart.js b/packageC/pages/presell/cart/cart.js index 7bde9a8..16f36a7 100644 --- a/packageC/pages/presell/cart/cart.js +++ b/packageC/pages/presell/cart/cart.js @@ -2392,10 +2392,8 @@ Page({ }, //选择支付方式 set_pay_type: function (e) { - if(this.data.paying) return false; this.data.paying=1; - var type = e.currentTarget.dataset.type; this.to_pay_type(type); }, @@ -2404,12 +2402,11 @@ Page({ to_pay_type: function (ind) { var th = this; //--物流支付时要有地址-- - if (th.data.exp_type == 0 && th.data.user_addr == null) { + //if (th.data.exp_type == 0 && th.data.user_addr == null) { + if(getApp().is_no_addr(th,th.data.exp_type)){ + this.data.paying=0; return getApp().my_warnning("请选择收货地址", 0, th); } - - - th.data.exp_type=parseInt(th.data.exp_type+''); //---支付参数-- var dd = { @@ -2492,7 +2489,7 @@ Page({ getApp().my_warnning("支付成功", 1, th); var send_time = th.data.pre_arr.delivery_date; if (th.data.pre_arr.delivery_type == 2) { - send_time = th.data.pre_arr.delivery_daynum * 3600; + send_time = ut.gettimestamp() +th.data.pre_arr.delivery_daynum * 3600*24; } th.setData({ isclose: 0, 'order.order_status': 1, 'order.pay_status': 1, 'wait_wk': 0, 'presell.tail_pay_state': 1, 'wait_fh': 1, send_time: send_time }); th.data.paying=0; @@ -2525,7 +2522,7 @@ Page({ if (t.data.code == 0) { var send_time = th.data.pre_arr.delivery_date; if (th.data.pre_arr.delivery_type == 2) { - send_time = th.data.pre_arr.delivery_daynum * 3600; + send_time = ut.gettimestamp() +th.data.pre_arr.delivery_daynum * 3600*24; } //---用余额支付--- getApp().my_warnning("支付成功", 1, th); diff --git a/packageC/pages/presell/cart/cart.wxml b/packageC/pages/presell/cart/cart.wxml index 91c2cfe..f8e8735 100644 --- a/packageC/pages/presell/cart/cart.wxml +++ b/packageC/pages/presell/cart/cart.wxml @@ -328,10 +328,10 @@ - - + + 配送费用 - ¥ {{filters.toFix(order.shipping_status,2)}}元 + ¥ {{filters.toFix(order.shipping_price,2)}}元 diff --git a/packageC/pages/presell/cart/cart2.js b/packageC/pages/presell/cart/cart2.js index 098213e..0dad414 100644 --- a/packageC/pages/presell/cart/cart2.js +++ b/packageC/pages/presell/cart/cart2.js @@ -1116,11 +1116,13 @@ Page({ //------------立即购买------------- if (th.data.is_b_now == 1 && th.data.bn_goods.prom_type != 5) { - if( [0,2].indexOf(th.data.bn_exp_type)>-1 && th.data.user_addr == null) { + //if( [0,2].indexOf(th.data.bn_exp_type)>-1 && th.data.user_addr == null) { + if(getApp().is_no_addr(th,th.data.bn_exp_type)){ ff = false; getApp().my_warnning("请选择收货地址", 0, th); th.data.is_summit_ing = 0; } + if (!ff) return false; var addr = th.data.user_addr; if (th.data.bn_exp_type == 1) addr = null; diff --git a/packageC/pages/presell/cart/cart2_pre.js b/packageC/pages/presell/cart/cart2_pre.js index 76bf4b8..1ef4e84 100644 --- a/packageC/pages/presell/cart/cart2_pre.js +++ b/packageC/pages/presell/cart/cart2_pre.js @@ -719,7 +719,8 @@ Page({ //------------立即购买------------- //如果不是阶梯团,或者是普通购买,商家选择了物流,以及地址为空的时候 - if (th.data.bn_exp_type == 0 && th.data.user_addr == null && (th.data.kt_type != 3 || th.data.bn_goods.is_normal == 1)) { + //th.data.bn_exp_type == 0 && th.data.user_addr == null + if (getApp().is_no_addr(th,th.data.bn_exp_type) && (th.data.kt_type != 3 || th.data.bn_goods.is_normal == 1)) { ff = false; getApp().my_warnning("请选择收货地址", 0, this); this.data.is_summit_ing = 0; diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js index 1185fa2..a101c3a 100644 --- a/packageE/pages/cart/cart2/cart2.js +++ b/packageE/pages/cart/cart2/cart2.js @@ -3815,7 +3815,8 @@ Page({ var ff = true; //------------立即购买------------- if (th.data.is_b_now == 1 && th.data.bn_goods.prom_type != 5) { - if ( [0,2].indexOf(th.data.bn_exp_type)>-1 && th.data.user_addr == null) { + //if ( [0,2].indexOf(th.data.bn_exp_type)>-1 && th.data.user_addr == null) { + if(getApp().is_no_addr(th,th.data.bn_exp_type)){ ff = false; getApp().my_warnning("请选择收货地址", 0, th); th.data.is_summit_ing = 0; @@ -4105,6 +4106,7 @@ Page({ th.data.is_summit_ing = 0; ff = false; getApp().confirmBox("请新建收货地址"); + th.setData({submit: 0}) } if (!ff) return false; diff --git a/packageE/pages/cart/cart2_inte/cart2_inte.js b/packageE/pages/cart/cart2_inte/cart2_inte.js index 2d32fac..48314fc 100644 --- a/packageE/pages/cart/cart2_inte/cart2_inte.js +++ b/packageE/pages/cart/cart2_inte/cart2_inte.js @@ -1001,7 +1001,7 @@ Page({ } }) if(!is_next){ - th.setData({is_show_sub:1, submit: 0,same_ok:0 }) + th.setData({is_show_sub:1, submit: 0,same_ok:0,show_submit:1}) return false } @@ -1081,10 +1081,12 @@ Page({ //------------立即购买------------- if (th.data.is_b_now == 1 && th.data.bn_goods.prom_type != 5) { - if ([0,2].indexOf(th.data.bn_exp_type)>-1 && th.data.user_addr == null) { + //if ([0,2].indexOf(th.data.bn_exp_type)>-1 && th.data.user_addr == null) { + if(getApp().is_no_addr(th,th.data.bn_exp_type)){ ff = false; getApp().my_warnning("请选择收货地址", 0, th); th.data.is_summit_ing = 0; } + if (!ff) return false; var addr = th.data.user_addr; if (th.data.bn_exp_type == 1) addr = null; diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js index bb906d7..1723251 100644 --- a/pages/cart/cart2_pt/cart2_pt.js +++ b/pages/cart/cart2_pt/cart2_pt.js @@ -1084,7 +1084,8 @@ Page({ console.log("buy_new"); //如果不是阶梯团,或者是普通购买,商家选择了物流,以及地址为空的时候 - if (th.data.bn_exp_type == 0 && th.data.user_addr == null && (th.data.kt_type != 3 || th.data.bn_goods.is_normal == 1)) { + //th.data.bn_exp_type == 0 && th.data.user_addr == null + if (getApp().is_no_addr(th,th.data.bn_exp_type) && (th.data.kt_type != 3 || th.data.bn_goods.is_normal == 1)) { ff = false; getApp().my_warnning("请选择收货地址", 0, this); this.data.is_summit_ing = 0; diff --git a/pages/cart/cart_wk/cart_wk.js b/pages/cart/cart_wk/cart_wk.js index 3a50e04..a253e05 100644 --- a/pages/cart/cart_wk/cart_wk.js +++ b/pages/cart/cart_wk/cart_wk.js @@ -570,11 +570,12 @@ Page({ to_pay_type: function (ind) { var th = this; //--物流支付时要有地址-- - if (th.data.exp_type == 0 && th.data.user_addr == null) { + //if (th.data.exp_type == 0 && th.data.user_addr == null) { + if (getApp().is_no_addr(th,th.data.exp_type)) { + this.data.paying=0; return getApp().my_warnning("请选择收货地址", 0, th); } - th.data.exp_type=parseInt(th.data.exp_type+''); //---支付参数-- var dd = {