diff --git a/application/index/controller/Index.php b/application/index/controller/Index.php index a067d15..71822a5 100755 --- a/application/index/controller/Index.php +++ b/application/index/controller/Index.php @@ -29,6 +29,10 @@ class Index extends Controller public function practice(){ $data=db('activity')->where('id',28)->find(); $data['son']=db('activity')->where('parentid',$data['id'])->order('sonid asc')->select(); + //这边要改成按照付款人数来显示 + foreach ($data['son'] as $k=>$v){ + $data['son'][$k]['buy_num']=M('order')->where(['aid'=>$v['id'],'status'=>2])->count(); + } $this->assign('data',$data); return $this->fetch(); }