Commit 898bc1d0cf5e13b2244d3be5f1d6a4d38df6c43a

Authored by yvan.ni
1 parent d4e20bf5

支付尾款的bug优化

packageC/pages/presell/cart/cart.js
@@ -803,10 +803,9 @@ Page({ @@ -803,10 +803,9 @@ Page({
803 } else { 803 } else {
804 o_condition = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit); 804 o_condition = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit);
805 if (o_condition < 0) o_condition = 0; 805 if (o_condition < 0) o_condition = 0;
806 -  
807 - if (o_condition1 < 0) o_condition1 = 0;  
808 - else if(o_condition1>th.data.goods.use_commission && th.data.bn_use_commission){  
809 - o_condition1-=th.data.bn_use_commission; 806 + //if (o_condition1 < 0) o_condition1 = 0;
  807 + else if(o_condition>th.data.goods.use_commission && th.data.bn_use_commission){
  808 + o_condition-=th.data.bn_use_commission;
810 } 809 }
811 810
812 th.setData({ exp_price: 0, order_m: o_condition, show_submit: 1, }) 811 th.setData({ exp_price: 0, order_m: o_condition, show_submit: 1, })
@@ -2225,7 +2224,7 @@ Page({ @@ -2225,7 +2224,7 @@ Page({
2225 var e_str = ut.formatTime(end_time); 2224 var e_str = ut.formatTime(end_time);
2226 var new_date = new Date(); //新建一个日期对象,默认现在的时间 2225 var new_date = new Date(); //新建一个日期对象,默认现在的时间
2227 var old_date = new Date(e_str.replace(/-/g, '/')); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期 2226 var old_date = new Date(e_str.replace(/-/g, '/')); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期
2228 - var difftime = (new_date - old_date) / 1000; //计算时间差,并把毫秒转换成秒 2227 + var difftime =Math.abs((new_date - old_date) / 1000); //计算时间差,并把毫秒转换成秒
2229 var days = parseInt(difftime / 86400); // 天 24*60*60*1000 2228 var days = parseInt(difftime / 86400); // 天 24*60*60*1000
2230 var hours = parseInt(difftime / 3600) - 24 * days; // 小时 60*60 总小时数-过去的小时数=现在的小时数 2229 var hours = parseInt(difftime / 3600) - 24 * days; // 小时 60*60 总小时数-过去的小时数=现在的小时数
2231 var minutes = parseInt(difftime % 3600 / 60); // 分钟 -(day*24) 以60秒为一整份 取余 剩下秒数 秒数/60 就是分钟数 2230 var minutes = parseInt(difftime % 3600 / 60); // 分钟 -(day*24) 以60秒为一整份 取余 剩下秒数 秒数/60 就是分钟数
@@ -2244,7 +2243,7 @@ Page({ @@ -2244,7 +2243,7 @@ Page({
2244 var e_str = ut.formatTime(end_time); 2243 var e_str = ut.formatTime(end_time);
2245 var new_date = new Date(); //新建一个日期对象,默认现在的时间 2244 var new_date = new Date(); //新建一个日期对象,默认现在的时间
2246 var old_date = new Date(e_str.replace(/-/g, '/')); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期 2245 var old_date = new Date(e_str.replace(/-/g, '/')); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期
2247 - var difftime = (new_date - old_date) / 1000; //计算时间差,并把毫秒转换成秒 2246 + var difftime =Math.abs((new_date - old_date) / 1000); //计算时间差,并把毫秒转换成秒
2248 var days = parseInt(difftime / 86400); // 天 24*60*60*1000 2247 var days = parseInt(difftime / 86400); // 天 24*60*60*1000
2249 var hours = parseInt(difftime / 3600) - 24 * days; // 小时 60*60 总小时数-过去的小时数=现在的小时数 2248 var hours = parseInt(difftime / 3600) - 24 * days; // 小时 60*60 总小时数-过去的小时数=现在的小时数
2250 var minutes = parseInt(difftime % 3600 / 60); // 分钟 -(day*24) 以60秒为一整份 取余 剩下秒数 秒数/60 就是分钟数 2249 var minutes = parseInt(difftime % 3600 / 60); // 分钟 -(day*24) 以60秒为一整份 取余 剩下秒数 秒数/60 就是分钟数