diff --git a/application/index/controller/Index.php b/application/index/controller/Index.php index 71822a5..0d482f6 100755 --- a/application/index/controller/Index.php +++ b/application/index/controller/Index.php @@ -31,7 +31,7 @@ class Index extends Controller $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(); + $data['son'][$k]['buy_num']=db('order')->where(['aid'=>$v['id'],'status'=>2])->count(); } $this->assign('data',$data); return $this->fetch();