...
|
...
|
@@ -76,10 +76,10 @@ class Article extends Api |
|
|
public function getArticleList()
|
|
|
{
|
|
|
$myId = $this->auth->id;
|
|
|
$myId = 25;
|
|
|
// $myId = 25;
|
|
|
|
|
|
$universityId = $this->request->param('university_id', 0, 'int');
|
|
|
$universityId = 892;
|
|
|
// $universityId = 892;
|
|
|
|
|
|
$collegeId = $this->request->param('college_id', 0, 'int');
|
|
|
|
...
|
...
|
@@ -413,8 +413,19 @@ class Article extends Api |
|
|
foreach ($articleTypeList as $k => $v) {
|
|
|
$articleTypeListObj[$v['id']] = $v;
|
|
|
}
|
|
|
$student = new Student();
|
|
|
|
|
|
foreach ($lookArticleList as $k => $v) {
|
|
|
|
|
|
$userInfo = $student->infoByUserId($v['user_id']);
|
|
|
if($userInfo) {
|
|
|
$lookArticleList[$k]['nickname'] = $userInfo['nickname'];
|
|
|
$lookArticleList[$k]['head_image'] = $userInfo['head_image'];
|
|
|
} else {
|
|
|
$lookArticleList[$k]['nickname'] = '';
|
|
|
$lookArticleList[$k]['head_image'] = '';
|
|
|
}
|
|
|
|
|
|
if(isset($likeStudentListObj[$v['user_id']])) {
|
|
|
$lookArticleList[$k]['is_like_user'] = 1;
|
|
|
} else {
|
...
|
...
|
@@ -811,7 +822,7 @@ class Article extends Api |
|
|
}
|
|
|
|
|
|
if($articleInfo['user_id'] != $userId) {
|
|
|
$this->error('');
|
|
|
$this->error('不能删除他人文章');
|
|
|
}
|
|
|
|
|
|
$res = $articleModel->delOne($articleId, ['deletetime' => time()]);
|
...
|
...
|
|