From 0a6b9cfdd3ccaf91ca8b9826e6dd7c698dc52f53 Mon Sep 17 00:00:00 2001 From: zhoujian <709286540@qq.com> Date: Sat, 10 Oct 2020 11:25:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=B7=B5=E7=9A=84=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/Index.php | 4 ++++ 1 file changed, 4 insertions(+) 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(); }