foreach($res as $k=>&$e){
$e['is_pingjia']=$e['is_evaluate'];
$name=&$e['order_num'];
if(!isset($u[$name])){
$u[$name]=$e;
unset($u[$name]['goods_id'],$u[$name]['goods_name'],$u[$name]['goods_image'],$u[$name]['goods_price'],$u[$name]['goods_num'],$u[$name]['spec_info'],$u[$name]['point'],$u[$name]['order_info_id'],$u[$name]['goods_is_after_finish']);
}
if($e['goods_id']!=''){
$u[$name]['goods'][]=array('order_info_id'=>$e['order_info_id'],'goods_id'=>$e['goods_id'],'goods_name'=>$e['goods_name'],'spec_info'=>$e['spec_info'],'goods_image'=>$e['goods_image'],'goods_price'=>$e['goods_price'],'goods_num'=>$e['goods_num'],'point'=>$e['point'],'spec'=>$spec,'is_return'=>$e['is_return'],'goods_is_after_finish'=>$e['goods_is_after_finish'],'is_sign'=>$e['is_sign'],'is_pay'=>$e['is_pay'],'given_id'=>$e['given_id']
);//数组重组
}
}
array(51) {
["ge_id"] => NULL
["id"] => string(6) "893162"
["union_num"] => string(12) "815645570061"
["order_num"] => &string(12) "815645570061"
["member_id"] => string(1) "1"
["member_name"] => string(11) "13570221631"
["member_level"] => string(1) "2"
["order_type"] => string(1) "8"
["goods_amount"] => string(6) "183.70"
["order_from"] => NULL
["price_list"] => string(1) "1"
["points"] => string(4) "2.25"
["member_mark"] => string(0) ""
["admin_mark"] => NULL
["mark"] => NULL
["truename"] => string(3) "lmp"
["tel"] => string(11) "13612560591"
["province"] => string(9) "广东省"
["city"] => string(9) "广州市"
["country"] => string(9) "白云区"
["town"] => string(12) "均禾街道"
["address"] => string(6) "桃园"
["transport_name"] => string(12) "韵达快递"
["transport_fee"] => string(4) "3.00"
["pay_time"] => NULL
["pay_type"] => NULL
["gso_id"] => string(1) "0"
["is_pay"] => string(1) "0"
["is_check"] => string(1) "0"
["is_sign"] => string(1) "0"
["is_send"] => string(1) "0"
["is_evaluate"] => string(1) "0"
["is_cancel"] => string(1) "0"
["is_recycle"] => string(1) "0"
["is_del"] => string(1) "0"
["order_path"] => string(0) ""
["tran_path"] => string(0) ""
["is_ok"] => string(1) "0"
["export_name"] => NULL
["export_num"] => NULL
["warehouse_id"] => string(1) "1"
["send_time"] => NULL
["member_rec"] => string(11) "18816795346"
["posttime"] => string(10) "1564557006"
["agent_num"] => string(1) "0"
["is_distribution"] => string(1) "0"
["status"] => NULL
["is_return"] => string(1) "0"
["spec_id"] => string(4) "1460"
["is_pingjia"] => string(1) "0"
["goods"] => array(2) {
[0] => array(14) {
["order_info_id"] => string(7) "1635612"
["goods_id"] => string(3) "461"
["goods_name"] => string(27) "冻干复配螺旋藻颗粒"
["spec_info"] => string(3) "60g"
["goods_image"] => string(28) "/20170504/1493889842_268.jpg"
["goods_price"] => string(6) "108.00"
["goods_num"] => string(1) "1"
["point"] => string(4) "1.20"
["spec"] => NULL
["is_return"] => string(1) "0"
["goods_is_after_finish"] => string(1) "0"
["is_sign"] => string(1) "0"
["is_pay"] => string(1) "0"
["given_id"] => NULL
}
[1] => array(14) {
["order_info_id"] => string(7) "1635613"
["goods_id"] => string(3) "269"
["goods_name"] => string(19) "琪源堂 百想膏"
["spec_info"] => string(18) "婴幼儿童专用"
["goods_image"] => string(28) "/20160822/1471837745_5id.jpg"
["goods_price"] => string(5) "11.50"
["goods_num"] => string(1) "1"
["point"] => string(4) "0.05"
["spec"] => NULL
["is_return"] => string(1) "0"
["goods_is_after_finish"] => string(1) "0"
["is_sign"] => string(1) "0"
["is_pay"] => string(1) "0"
["given_id"] => NULL
}
}
}