This commit is contained in:
wangjinlei
2021-08-30 11:42:55 +08:00
parent 8951c60621
commit a01308bf14
5 changed files with 305 additions and 39 deletions

View File

@@ -223,6 +223,13 @@ class Chief extends Controller {
}
$list[$k]['author'] = substr($au, 0,-1);
}
foreach ($list as $k => $v){
if($v['type']){
$list[$k]['type'] = translateType($v['type']);
}
}
$re['articles'] = $list;
return jsonSuccess($re);
}
@@ -252,7 +259,11 @@ class Chief extends Controller {
$list[$k]['author'] = substr($au, 0,-1);
}
$count = $this->article_obj->where('journal_id',$data['journal_id'])->where('state',5)->count();
foreach ($list as $k => $v){
if($v['type']){
$list[$k]['type'] = translateType($v['type']);
}
}
$re['count'] = $count;
$re['articles'] = $list;
return jsonSuccess($re);
@@ -394,6 +405,7 @@ class Chief extends Controller {
return jsonError('Account or Email has been register!');
}
$insert['account'] = trim($data['account']);
$insert['email'] = trim($data['email']);
$insert['password'] = md5(trim($data['password']));
$insert['realname'] = isset($data['realname'])?trim($data['realname']):'';
$insert['phone'] = isset($data['phone'])?trim($data['phone']):'';