作者 开飞机的舒克

扫码加分问题修改

@@ -166,10 +166,8 @@ class Index extends Api @@ -166,10 +166,8 @@ class Index extends Api
166 { 166 {
167 $user = $this->auth->getUserinfo(); 167 $user = $this->auth->getUserinfo();
168 $find = \db('study')->where('user_id',$user['id'])->find(); 168 $find = \db('study')->where('user_id',$user['id'])->find();
169 - $res = \db('study_score_log')->where('study_id',$find['id'])->column('campus_id');  
170 - foreach ($res as $k){  
171 - $data = \db('campus')->where('id',$k)->find();  
172 - } 169 + $res = \db('study_score_log')->where('study_id',$find['id'])->value('campus_id');
  170 + $data[] = \db('campus')->where('id',$res)->find();
173 // $data = db('campus c') 171 // $data = db('campus c')
174 // ->join('activity a','a.id = c.activity_id') 172 // ->join('activity a','a.id = c.activity_id')
175 // ->join('school s','s.id = c.school_id') 173 // ->join('school s','s.id = c.school_id')