export const retCartData = function(list){ if(Object.prototype.toString.call(list) =="[object Array]"){ list.forEach(function(item){ if (item.license_time){ var date = new Date(item.license_time.replace(/-/g,"/")); item.licensetime = `${date.getFullYear()}年${date.getMonth()+1}月` } if (item.order_price){ item.orderprice = (item.order_price / 100).toFixed(2) } if (item.booking_price){ item.bookingprice = (item.booking_price / 100).toFixed(2) } }) return list; }else{ return []; } }