作者 王智

daima

@@ -67,8 +67,17 @@ class Renwu extends Backend @@ -67,8 +67,17 @@ class Renwu extends Backend
67 67
68 $row->getRelation('user')->visible(['nickname', 'mobile', 'address', 'address_con', 'car_num', 'color', 'car_type', 'vip']); 68 $row->getRelation('user')->visible(['nickname', 'mobile', 'address', 'address_con', 'car_num', 'color', 'car_type', 'vip']);
69 $row->getRelation('vip')->visible(['title']); 69 $row->getRelation('vip')->visible(['title']);
70 - $row['xi_id']=111;  
71 - $row['zhao_id']=222; 70 + $OrderInfo = Db::name('renwu')->where('order_sn', $row['order_sn'])->find();
  71 + if ($OrderInfo['xi_id'] == null || $OrderInfo['xi_id'] == '' || $OrderInfo['xi_id'] == "") {
  72 + $row['xi_id'] = '';
  73 + } else {
  74 + $row['xi_id'] = Db::name('user')->where('id', $OrderInfo['xi_id'])->value('nickname');
  75 + }
  76 + if ($OrderInfo['zhao_id'] == null || $OrderInfo['zhao_id'] == '' || $OrderInfo['zhao_id'] == "") {
  77 + $row['zhao_id'] = '';
  78 + } else {
  79 + $row['zhao_id'] = Db::name('user')->where('id', $OrderInfo['zhao_id'])->value('nickname');
  80 + }
72 } 81 }
73 $list = collection($list)->toArray(); 82 $list = collection($list)->toArray();
74 $result = array("total" => $total, "rows" => $list); 83 $result = array("total" => $total, "rows" => $list);