1
This commit is contained in:
@@ -239,11 +239,7 @@ class Board extends Controller {
|
||||
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Board/getBoardListForSubmit';
|
||||
$pra = [];
|
||||
$pra['issn'] = $journal_info['issn'];
|
||||
// if($data['board_group_id']!=-1){
|
||||
$pra['board_group_id'] = $data['board_group_id'];
|
||||
// }else{
|
||||
// $pra['board_group_id']
|
||||
// }
|
||||
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||
$boards = $res['data']['boards'];
|
||||
$frag = [];
|
||||
@@ -251,13 +247,33 @@ class Board extends Controller {
|
||||
$cache_user = $this->user_obj->where('user_id',$v['tuser_id'])->find();
|
||||
$h_index = $this->user_index_obj->where('user_id',$cache_user['user_id'])->where('year',date('Y'))->find();
|
||||
$h_index_num = 0;
|
||||
$gh_index_num = 0;
|
||||
if($h_index){
|
||||
$h_index_num = $h_index['h_index'];
|
||||
$h_index_num = $h_index['gh_index'];
|
||||
}
|
||||
$boards[$k]['phone'] = $cache_user['phone'];
|
||||
$boards[$k]['hindex'] = $h_index_num;
|
||||
$boards[$k]['ghindex'] = $gh_index_num;
|
||||
}
|
||||
$re['boards'] = $boards;
|
||||
|
||||
foreach ($boards as $v) {
|
||||
if ($v['type'] == 0) {
|
||||
$frag['main'][] = $v;
|
||||
} elseif ($v['type'] == 1) {
|
||||
$frag['remain'][] = $v;
|
||||
} else {
|
||||
if ($v['board_group_id'] == 0) {
|
||||
$frag['member']['none'][] = $v;
|
||||
} else {
|
||||
$frag['member'][$v['group_name']][] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$re['boards'] = $frag;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
@@ -304,6 +320,8 @@ class Board extends Controller {
|
||||
$pra['board_id'] = $data['board_id'];
|
||||
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||
$board = $res['data']['board'];
|
||||
|
||||
dump($board);die;
|
||||
$journal_info = $this->journal_obj->where('issn',$board['issn'])->find();
|
||||
$this->board_to_journal_obj->where('user_id',$board['tuser_id'])->where('journal_id',$journal_info['journal_id'])->update(['state'=>1]);
|
||||
return jsonSuccess([]);
|
||||
@@ -402,6 +420,7 @@ class Board extends Controller {
|
||||
return jsonError("Add repeatedly");
|
||||
}
|
||||
|
||||
// $url = 'http://www.journal.com/master/Board/addBoard';
|
||||
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Board/addBoard';
|
||||
$pra = [];
|
||||
$pra['user_id'] = $data['user_id'];
|
||||
@@ -417,6 +436,7 @@ class Board extends Controller {
|
||||
$pra['country'] = $data['country'];
|
||||
$pra['board_icon'] = $data['board_icon'];
|
||||
$pra['board_group_id'] = $data['board_group_id'];
|
||||
|
||||
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||
if($res['code']==1){
|
||||
return jsonError($res['msg']);
|
||||
|
||||
Reference in New Issue
Block a user