Commit 40e607aaa75b20194f34bf2793017fe9fc546ec2

Authored by yvan.ni
1 parent b2bb38d3

订单的显示服务卡项的优化

pages/user/order_list/order_list.js
@@ -2135,10 +2135,12 @@ Page({ @@ -2135,10 +2135,12 @@ Page({
2135 if (currentIndex == 2) { // 卡项订单 2135 if (currentIndex == 2) { // 卡项订单
2136 list = th.data.cardList; 2136 list = th.data.cardList;
2137 var new_data= data.map((item,index)=>{ 2137 var new_data= data.map((item,index)=>{
2138 - item.pt_status=item.list[0].pt_status;  
2139 - item.pt_tail_money=item.list[0].pt_tail_money;  
2140 - item.prom_id=item.list[0].prom_id;  
2141 - item.prom_type=item.list[0].prom_type; 2138 + if(item.list && item.list.length){
  2139 + item.pt_status=item.list[0].pt_status;
  2140 + item.pt_tail_money=item.list[0].pt_tail_money;
  2141 + item.prom_id=item.list[0].prom_id;
  2142 + item.prom_type=item.list[0].prom_type;
  2143 + }
2142 return item; 2144 return item;
2143 }) 2145 })
2144 2146