فهرست منبع

同步选房系统

linwu 3 سال پیش
والد
کامیت
6396c20731
1فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 6 4
      app/Admin/Controllers/Content/BuyHouseController.php

+ 6 - 4
app/Admin/Controllers/Content/BuyHouseController.php

@@ -324,11 +324,13 @@ class BuyHouseController extends Controller
                 $child_cards = [];
                 foreach ($family as $fa) {
                     if ($fa['relation'] == '配偶') {
-                        $data_item['xm2']   = $fa['realname'];
-                        $data_item['card2'] = $fa['idcard'];
+                        $data_item['xm2']   = $fa['realname'] == '无' ? '' : $fa['realname'];
+                        $data_item['card2'] = $fa['idcard'] == '无' ? '' : $fa['idcard'];
                     } else {
-                        $child_names[] = $fa['realname'];
-                        $child_cards[] = $fa['idcard'];
+                        if ($fa['realname'] != '无') {
+                            $child_names[] = $fa['realname'];
+                            $child_cards[] = $fa['idcard'];
+                        }
                     }
                 }
                 $data_item['xm3']   = implode('/', $child_names);