From 4258b31893442bebe8355b02d87f425507c2ebe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=93=9C=E5=93=A5?= Date: Mon, 5 Jul 2021 21:37:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B7=BB=E5=8A=A0=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E6=97=B6=E7=9A=84=E5=AD=A6=E5=8F=B7=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/kaohao/model/SearchMore.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/kaohao/model/SearchMore.php b/app/kaohao/model/SearchMore.php index ae55e97c..a8caeefd 100755 --- a/app/kaohao/model/SearchMore.php +++ b/app/kaohao/model/SearchMore.php @@ -343,7 +343,15 @@ class SearchMore extends BaseModel ->where('id', $val->student_id) ->field('id, xingming, xuehao') ->find(); - $data[$key]->banjiKaohao[$key]->cjStudent = array('id' => $stuinof->id, 'shoupin' => $stuinof->shoupin); + if ($stuinof) { + $data[$key]->banjiKaohao[$key]->cjStudent = [ + 'id' => $stuinof->id + ,'xingming' => $stuinof->xingming + ,'sex' => $stuinof->sex + ,'shoupin' => $stuinof->shoupin + ,'xuehao' => $stuinof->xuehao + ]; + } } $data[$key]['banjiKaohao'][$k]['shoupin'] = $val['cjStudent']['shoupin']; }