20201112
This commit is contained in:
@@ -27,6 +27,8 @@ class Article extends Controller {
|
|||||||
protected $article_transfer_obj = '';
|
protected $article_transfer_obj = '';
|
||||||
protected $chief_to_journal_obj = '';
|
protected $chief_to_journal_obj = '';
|
||||||
protected $login_auto_obj = '';
|
protected $login_auto_obj = '';
|
||||||
|
protected $major_obj = "";
|
||||||
|
protected $major_to_journal_obj = '';
|
||||||
|
|
||||||
public function __construct(\think\Request $request = null) {
|
public function __construct(\think\Request $request = null) {
|
||||||
parent::__construct($request);
|
parent::__construct($request);
|
||||||
@@ -46,6 +48,8 @@ class Article extends Controller {
|
|||||||
$this->article_transfer_obj = Db::name('article_transfer');
|
$this->article_transfer_obj = Db::name('article_transfer');
|
||||||
$this->chief_to_journal_obj = Db::name('chief_to_journal');
|
$this->chief_to_journal_obj = Db::name('chief_to_journal');
|
||||||
$this->login_auto_obj = Db::name('login_auto');
|
$this->login_auto_obj = Db::name('login_auto');
|
||||||
|
$this->major_obj = Db::name("major");
|
||||||
|
$this->major_to_journal_obj = Db::name('major_to_journal');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -645,6 +649,31 @@ class Article extends Controller {
|
|||||||
$url = 'https://submission.tmrjournals.com/per_text?Art_id='.$article_id.'&act='.$code;
|
$url = 'https://submission.tmrjournals.com/per_text?Art_id='.$article_id.'&act='.$code;
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 获取期刊by领域
|
||||||
|
* @description 获取期刊by领域
|
||||||
|
* @author wangjinlei
|
||||||
|
* @url /api/Article/getJournalsByMajor
|
||||||
|
* @method POST
|
||||||
|
*
|
||||||
|
* @param name:major_id type:int require:1 desc:领域id
|
||||||
|
*
|
||||||
|
* @return journals:期刊列表#
|
||||||
|
*/
|
||||||
|
public function getJournalsByMajor(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
// $data['major_id'] = 60;
|
||||||
|
$list = $this->major_to_journal_obj
|
||||||
|
->field("t_journal.*")
|
||||||
|
->join("t_journal","t_journal.issn = t_major_to_journal.journal_issn","left")
|
||||||
|
->where("t_major_to_journal.major_id",$data['major_id'])
|
||||||
|
->where('t_major_to_journal.mtj_state',0)
|
||||||
|
->select();
|
||||||
|
|
||||||
|
$re['journals'] = $list;
|
||||||
|
return jsonSuccess($re);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -836,14 +865,32 @@ class Article extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加文章(作者)
|
* @title 添加文章(投稿)
|
||||||
|
* @description 添加文章(投稿)
|
||||||
|
* @author wangjinlei
|
||||||
|
* @url /api/Article/addArticle
|
||||||
|
* @method POST
|
||||||
|
*
|
||||||
|
* @param name:username type:string require:1 desc:用户名
|
||||||
|
* @param name:journal type:int require:1 desc:期刊id
|
||||||
|
* @param name:title type:int require:1 desc:标题
|
||||||
|
* @param name:keyWords type:String require:1 desc:关键字
|
||||||
|
* @param name:fund type:string require:0 desc:fund
|
||||||
|
* @param name:type type:String require:1 desc:类型缩写
|
||||||
|
* @param name:major type:int require:1 desc:领域id
|
||||||
|
* @param name:approval type:string require:1 desc:true/false
|
||||||
|
* @param name:abstrart type:string require:1 desc:简介
|
||||||
|
* @param name:authorList type:array require:1 desc:作者
|
||||||
|
*
|
||||||
|
* @return articles:文章列表#
|
||||||
|
* @return count:总数#
|
||||||
*/
|
*/
|
||||||
public function addArticle() {
|
public function addArticle() {
|
||||||
//接受参数,查询信息
|
//接受参数,查询信息
|
||||||
$data = $this->request->post();
|
$data = $this->request->post();
|
||||||
$user_res = $this->user_obj->where('account', $data['username'])->find();
|
$user_res = $this->user_obj->where('account', $data['username'])->find();
|
||||||
|
|
||||||
if($user_res['account']=='fariba'||$user_res['account']=='Mohammad Hossein'||$user_res['account']=='xiaoyueyue'||$user_res['account']=='sethlee000'||$user_res['account']=='yuanying9908'){
|
if($user_res['account']=='fariba'||$user_res['account']=='zc'||$user_res['account']=='Mohammad Hossein'||$user_res['account']=='xiaoyueyue'||$user_res['account']=='sethlee000'||$user_res['account']=='yuanying9908'){
|
||||||
return json(['code'=>1,'msg'=>'Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.']);
|
return json(['code'=>1,'msg'=>'Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.']);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1117,12 +1164,6 @@ class Article extends Controller {
|
|||||||
$re['articles'] = $list;
|
$re['articles'] = $list;
|
||||||
return jsonSuccess($re);
|
return jsonSuccess($re);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function getMajors(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存储article文件历史信息
|
* 存储article文件历史信息
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ class Auto extends Controller {
|
|||||||
$tt .= 'Website:<a href="' . $cache_journal['website'] . '">' . $cache_journal['website'] . '</a>';
|
$tt .= 'Website:<a href="' . $cache_journal['website'] . '">' . $cache_journal['website'] . '</a>';
|
||||||
|
|
||||||
$maidata['email'] = $cache_author['email'];
|
$maidata['email'] = $cache_author['email'];
|
||||||
$maidata['title'] = "Deadline for your revision of " . $cache_journal['title'] . " -Reminder";
|
$maidata['title'] = "Revision Due Date-" . $cache_journal['title'];
|
||||||
$maidata['content'] = $tt;
|
$maidata['content'] = $tt;
|
||||||
$maidata['tmail'] = $cache_journal['email'];
|
$maidata['tmail'] = $cache_journal['email'];
|
||||||
$maidata['tpassword'] = $cache_journal['epassword'];
|
$maidata['tpassword'] = $cache_journal['epassword'];
|
||||||
|
|||||||
@@ -146,6 +146,34 @@ class Major extends Controller {
|
|||||||
$this->major_obj->where("major_id", $data['major_id'])->update(['major_state' => 1]);
|
$this->major_obj->where("major_id", $data['major_id'])->update(['major_state' => 1]);
|
||||||
return jsonSuccess([]);
|
return jsonSuccess([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 选择期刊领域
|
||||||
|
* @description 选择期刊领域
|
||||||
|
* @author wangjinlei
|
||||||
|
* @url /api/Major/getMajorForAddArticle
|
||||||
|
* @method POST
|
||||||
|
*
|
||||||
|
* @param name:journal_id type:int require:1 desc:期刊id
|
||||||
|
* @param name:major_id type:int require:1 desc:领域id
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function getMajorForAddArticle(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||||||
|
$majors = $this->major_to_journal_obj
|
||||||
|
->field("t_major.*")
|
||||||
|
->join("t_major",'t_major.major_id = t_major_to_journal.major_id','left')
|
||||||
|
->where("t_major_to_journal.journal_issn",$journal_info['issn'])
|
||||||
|
->where("t_major.pid",$data['major_id'])
|
||||||
|
->where("t_major.major_type",0)
|
||||||
|
->where("t_major.major_state",0)
|
||||||
|
->select();
|
||||||
|
$re['majors'] = $majors;
|
||||||
|
return jsonSuccess($re);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title 获取领域树
|
* @title 获取领域树
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class Reviewer extends Controller {
|
|||||||
->join('t_article', 't_article_reviewer.article_id = t_article.article_id', 'LEFT')
|
->join('t_article', 't_article_reviewer.article_id = t_article.article_id', 'LEFT')
|
||||||
->join('t_journal', 't_article.journal_id = t_journal.journal_id', 'LEFT')
|
->join('t_journal', 't_article.journal_id = t_journal.journal_id', 'LEFT')
|
||||||
->where('t_article_reviewer.reviewer_id', $reviewer_info['user_id'])
|
->where('t_article_reviewer.reviewer_id', $reviewer_info['user_id'])
|
||||||
|
->where("t_article.state",2)
|
||||||
->order('t_article_reviewer.state')
|
->order('t_article_reviewer.state')
|
||||||
->limit($limit_start, $data['pageSize'])
|
->limit($limit_start, $data['pageSize'])
|
||||||
->select();
|
->select();
|
||||||
@@ -678,6 +679,12 @@ class Reviewer extends Controller {
|
|||||||
|
|
||||||
return json(['code' => 0]);
|
return json(['code' => 0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// public function jpg_test(){
|
||||||
|
// $reviewer_ZS = self::createReviewerZS(3380);
|
||||||
|
// sendEmail("849192806@qq.com", "title", "ttttt", "content", 'tmr@tmrjournals.com', "Wu9999999999", $reviewer_ZS);
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取问卷详情
|
* 获取问卷详情
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class User extends Controller {
|
|||||||
*/
|
*/
|
||||||
public function checkLogin() {
|
public function checkLogin() {
|
||||||
$data = $this->request->post();
|
$data = $this->request->post();
|
||||||
if($data['username']=='fariba'||$data['username']=='Mohammad Hossein'||$data['username']=='xiaoyueyue'||$data['username']=='sethlee000'||$data['username']=='yuanying9908'){
|
if($data['username']=='fariba'||$data['username']=='zc'||$data['username']=='Mohammad Hossein'||$data['username']=='xiaoyueyue'||$data['username']=='sethlee000'||$data['username']=='yuanying9908'){
|
||||||
return json(['code'=>1,'msg'=>'Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.']);
|
return json(['code'=>1,'msg'=>'Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,12 +72,12 @@ function sendEmail($email = '', $title = '', $from_name = '', $content = '', $me
|
|||||||
$mail->AltBody = '';
|
$mail->AltBody = '';
|
||||||
if (is_array($attachmentFile)) {
|
if (is_array($attachmentFile)) {
|
||||||
for ($i = 0; $i < count($attachmentFile); $i++) {
|
for ($i = 0; $i < count($attachmentFile); $i++) {
|
||||||
$mail->addAttachment($attachmentFile[$i], 'thanks.pdf' . $i); //这里可以是多维数组,然后循环附件的文件和名称
|
$mail->addAttachment($attachmentFile[$i], 'thanks.jpg' . $i); //这里可以是多维数组,然后循环附件的文件和名称
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($attachmentFile != '') {
|
if ($attachmentFile != '') {
|
||||||
//Attach an image file
|
//Attach an image file
|
||||||
$mail->addAttachment($attachmentFile, 'thanks.pdf');
|
$mail->addAttachment($attachmentFile, 'thanks.jpg');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//send the message, check for errors
|
//send the message, check for errors
|
||||||
|
|||||||
Reference in New Issue
Block a user