diff --git a/pages/user/order_list/ofilter.wxs b/pages/user/order_list/ofilter.wxs index 6492774..e10ac1a 100644 --- a/pages/user/order_list/ofilter.wxs +++ b/pages/user/order_list/ofilter.wxs @@ -6,22 +6,22 @@ module.exports = { return url; }, for_mat_val:function (e){ - if(e==undefined) return '-'; - if(e==null) return '-'; - if(e=="null") return '-'; - if(e=="") return '-'; + if(e===undefined) return '-'; + if(e===null) return '-'; + if(e==="null") return '-'; + if(e==="") return '-'; return e; }, toFix: function (val, count) { - if(val==undefined) return '-'; - if(val==null) return '-'; - if(val=="null") return '-'; - if(val=="") return '-'; + if(val===undefined) return '-'; + if(val===null) return '-'; + if(val==="null") return '-'; + if(val==="") return '-'; if (!val) { - return parseFloat(0).toFixed(count); + return "0"; } val = parseFloat(val); - return val.toFixed(count) + return parseFloat(val.toFixed(count)) }, } \ No newline at end of file diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js index 18d10aa..8fd05a0 100644 --- a/pages/user/order_list/order_list.js +++ b/pages/user/order_list/order_list.js @@ -2683,7 +2683,10 @@ Page({ var data = res.data.data.pageData; // 判断有无更多数据可以加载,如果大于则没有更多数据,反之则有 if (res.data.data.page * res.data.data.pageSize >= res.data.data.total) { th.setData({ is_no_more2: 1 }); } - let list = []; + + + let list = th.data.list2; + if(!list) list=[]; if (currentIndex == 1) { //list = th.data.list2; diff --git a/pages/user/order_list/order_list.wxml b/pages/user/order_list/order_list.wxml index 70438d6..7f94377 100644 --- a/pages/user/order_list/order_list.wxml +++ b/pages/user/order_list/order_list.wxml @@ -535,7 +535,7 @@ {{i.Qty}} {{i.Price}} - {{i.Sum}} + {{ofil.toFix(i.Sum,2)}} @@ -551,7 +551,7 @@ 实付金额 - {{item.FactSum}} + {{ofil.toFix(item.FactSum,2)}} 本次积分