1
This commit is contained in:
@@ -153,7 +153,6 @@ class Production extends Controller
|
|||||||
$insert['article_id'] = $data['article_id'];
|
$insert['article_id'] = $data['article_id'];
|
||||||
$insert['journal_id'] = $article_info['journal_id'];
|
$insert['journal_id'] = $article_info['journal_id'];
|
||||||
$insert['ctime'] = time();
|
$insert['ctime'] = time();
|
||||||
|
|
||||||
$this->production_article_obj->insert($insert);
|
$this->production_article_obj->insert($insert);
|
||||||
return jsonSuccess([]);
|
return jsonSuccess([]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,4 +94,297 @@ class Publish extends Controller
|
|||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取publish文章
|
||||||
|
*/
|
||||||
|
public function getPublicAiticles(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'issn'=>'require',
|
||||||
|
'pageIndex'=>'require',
|
||||||
|
'pageSize'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/getArticleListForSubmit';
|
||||||
|
$pra = [];
|
||||||
|
$pra['issn'] = $data['issn'];
|
||||||
|
$pra['journal_stage_id'] = isset($data['journal_stage_id'])?$data['journal_stage_id']:0;
|
||||||
|
$pra['seach'] = isset($data['seach'])?trim($data['seach']):'';
|
||||||
|
$pra['pageIndex'] = $data['pageIndex'];
|
||||||
|
$pra['pageSize'] = $data['pageSize'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
return jsonSuccess($res['data']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提前出刊
|
||||||
|
*/
|
||||||
|
public function pushPublish(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'journal_stage_id'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Journal/pushJournalPublishForSubmit';
|
||||||
|
$url1 = 'http://journalapi.tmrjournals.com/public/index.php/master/Datebase/dataPush';
|
||||||
|
$pra = [];
|
||||||
|
$pra['journal_stage_id'] = $data['journal_stage_id'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
$res1 = object_to_array(json_decode(myPost($url1, $pra)));
|
||||||
|
return jsonSuccess([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取期刊文章
|
||||||
|
*/
|
||||||
|
public function getJournalArticles(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'issn'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/getArticleForSubmit';
|
||||||
|
$pra = [];
|
||||||
|
$pra['issn'] = $data['issn'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
$re['stages'] = $res['data']['stages'];
|
||||||
|
return jsonSuccess($re);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有分期
|
||||||
|
*/
|
||||||
|
public function getAllStages(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'issn'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/getAllStagesForSubmit';
|
||||||
|
$pra = [];
|
||||||
|
$pra['issn'] = $data['issn'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
$re['stages'] = $res['data']['stages'];
|
||||||
|
return jsonSuccess($re);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取客座期刊列表
|
||||||
|
*/
|
||||||
|
public function getJournalSpecials(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'issn'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Special/getSpecialByIssn';
|
||||||
|
$pra = [];
|
||||||
|
$pra['journal_issn'] = $data['issn'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
$re['stages'] = $res['data']['specials'];
|
||||||
|
return jsonSuccess($re);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑文章的客座期刊信息
|
||||||
|
*/
|
||||||
|
public function editArticleToSpecial(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'article_id'=>'require',
|
||||||
|
'journal_special_id'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/changeArticleSpecialForSubmit';
|
||||||
|
$pra = [];
|
||||||
|
$pra['article_id'] = $data['article_id'];
|
||||||
|
$pra['journal_special_id'] = $data['journal_special_id'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
return jsonSuccess([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取文章的基本信息
|
||||||
|
*/
|
||||||
|
public function getArticleDetail(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'article_id'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/getArticleBase';
|
||||||
|
$pra = [];
|
||||||
|
$pra['article_id'] = $data['article_id'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
return jsonSuccess($res['data']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 获取期刊话题
|
||||||
|
// */
|
||||||
|
// public function getJournalTopics(){
|
||||||
|
// $data = $this->request->post();
|
||||||
|
// $rule = new Validate([
|
||||||
|
// 'issn'=>'require'
|
||||||
|
// ]);
|
||||||
|
// if(!$rule->check($data)){
|
||||||
|
// return jsonError($rule->getError());
|
||||||
|
// }
|
||||||
|
// $url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/getTopicByArticle';
|
||||||
|
// $pra = [];
|
||||||
|
// $pra['article_id'] = $data['article_id'];
|
||||||
|
// $res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
// return jsonSuccess($res['data']);
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取文章的期刊话题列表
|
||||||
|
*/
|
||||||
|
public function getArticleTopics(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'article_id'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/getTopicByArticle';
|
||||||
|
$pra = [];
|
||||||
|
$pra['article_id'] = $data['article_id'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
return jsonSuccess($res['data']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加文章话题对应关系
|
||||||
|
*/
|
||||||
|
public function addArticleToTopic(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'article_id'=>'require',
|
||||||
|
'topic_id'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/addTopicByArticle';
|
||||||
|
$pra = [];
|
||||||
|
$pra['article_id'] = $data['article_id'];
|
||||||
|
$pra['topic_id'] = $data['topic_id'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
return jsonSuccess([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除文章话题对应关系
|
||||||
|
*/
|
||||||
|
public function delArticleToTopic(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'article_to_topic_id'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/delTopic';
|
||||||
|
$pra = [];
|
||||||
|
$pra['article_to_topic_id'] = $data['article_to_topic_id'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
return jsonSuccess([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取相关文章列表
|
||||||
|
*/
|
||||||
|
public function getArticleRelates(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'article_id'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/getRelatedArticles';
|
||||||
|
$pra = [];
|
||||||
|
$pra['article_id'] = $data['article_id'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
return jsonSuccess($res['data']);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取关键词文章
|
||||||
|
*/
|
||||||
|
public function getKeywordArticleOrderJournal(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'keyword'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/getKeywordArticleOrderJournalForSubmit';
|
||||||
|
$pra = [];
|
||||||
|
$pra['keyword'] = trim($data['keyword']);
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
return jsonSuccess($res['data']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加相关文章
|
||||||
|
*/
|
||||||
|
public function addArticleRelate(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'article_id'=>'require',
|
||||||
|
'add_article_id'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/addRelatedArticle';
|
||||||
|
$pra = [];
|
||||||
|
$pra['article_id'] = $data['article_id'];
|
||||||
|
$pra['add_article_id'] = $data['add_article_id'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
return jsonSuccess([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除相关文章
|
||||||
|
*/
|
||||||
|
public function delArticleRelate(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'article_id'=>'require',
|
||||||
|
'del_article_id'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$url = 'http://journalapi.tmrjournals.com/public/index.php/master/Article/delRelatedArticle';
|
||||||
|
$pra = [];
|
||||||
|
$pra['article_id'] = $data['article_id'];
|
||||||
|
$pra['del_article_id'] = $data['del_article_id'];
|
||||||
|
$res = object_to_array(json_decode(myPost($url, $pra)));
|
||||||
|
return jsonSuccess([]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,8 @@ function sendEmail($email = '', $title = '', $from_name = '', $content = '', $me
|
|||||||
$net = Env::get('emailtemplete.net');
|
$net = Env::get('emailtemplete.net');
|
||||||
$net = str_replace("{{email}}",$memail,$net);
|
$net = str_replace("{{email}}",$memail,$net);
|
||||||
|
|
||||||
$mail->msgHTML($pre.$content.$net);
|
// $mail->msgHTML($pre.$content.$net);
|
||||||
|
$mail->msgHTML($content);
|
||||||
//Replace the plain text body with one created manually
|
//Replace the plain text body with one created manually
|
||||||
$mail->AltBody = '';
|
$mail->AltBody = '';
|
||||||
// if (is_array($attachmentFile)) {
|
// if (is_array($attachmentFile)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user