正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
@@ -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 | } |
-
请 注册 或 登录 后发表评论