作者 郭盛
1 个管道 的构建 通过 耗费 0 秒

修改评论

@@ -1090,13 +1090,13 @@ class Project extends Api @@ -1090,13 +1090,13 @@ class Project extends Api
1090 $where['a.farm_id'] = $param['farm_id']; 1090 $where['a.farm_id'] = $param['farm_id'];
1091 $where['a.project_id'] = $param['project_id']; 1091 $where['a.project_id'] = $param['project_id'];
1092 $where['a.status'] = 2; 1092 $where['a.status'] = 2;
1093 - $data = Db::name('comment') 1093 + $data['list'] = Db::name('comment')
1094 ->alias('a') 1094 ->alias('a')
1095 ->join('user b','a.user_id = b.id') 1095 ->join('user b','a.user_id = b.id')
1096 ->field('a.*,b.avatar,b.nickname,a.createtime') 1096 ->field('a.*,b.avatar,b.nickname,a.createtime')
1097 ->where($where) 1097 ->where($where)
1098 ->select(); 1098 ->select();
1099 - foreach ($data as &$v){ 1099 + foreach ($data['list'] as &$v){
1100 $v['is_zan'] = 1; 1100 $v['is_zan'] = 1;
1101 $v['createtime'] = date('Y-m-d H:i:s',$v['createtime']); 1101 $v['createtime'] = date('Y-m-d H:i:s',$v['createtime']);
1102 } 1102 }