diff --git a/.env b/.env index 767e0cf..73ab5ff 100644 --- a/.env +++ b/.env @@ -12,4 +12,158 @@ mail_server = imap.qq.com [journal] ;官网服务器地址 -base_url = http://journalapi.tmrjournals.com/public/index.php \ No newline at end of file +base_url = http://journalapi.tmrjournals.com/public/index.php + + +[emailtemplete] +pre = ' + + + + + + TMR + + + + + +
+
+ + +

TMR Publishing Group

+
+
+ TMR + / + Scientist Community + / + Database + / + Submission System +
+ +
+
+
' + + net = '
+
+

+ Copyright © TMR Publishing Group Limited.
+ E-mail: publisher@tmrjournals.com | https://www.tmrjournals.com
+ Telephone: +64 02108293806 +

+
+ +
+
+
+ + + +' \ No newline at end of file diff --git a/application/api/controller/Reviewer.php b/application/api/controller/Reviewer.php index 59e63ef..10f689f 100644 --- a/application/api/controller/Reviewer.php +++ b/application/api/controller/Reviewer.php @@ -598,10 +598,12 @@ class Reviewer extends Controller } $list = $this ->user_reviewer_info_obj - ->field('t_user.email') + ->field('t_user.user_id,t_user.email') ->join('t_user','t_user.user_id = t_user_reviewer_info.reviewer_id','left') ->where('t_user_reviewer_info.major',$topic['major_id']) - ->where('t_user_reviewer_info.state',0)->select(); + ->where('t_user.is_advert',0) + ->where('t_user_reviewer_info.state',0) + ->select(); $re['reviewers'] = $list; return jsonSuccess($re); diff --git a/application/api/controller/Typeset.php b/application/api/controller/Typeset.php index 900737e..0bf0988 100644 --- a/application/api/controller/Typeset.php +++ b/application/api/controller/Typeset.php @@ -237,19 +237,19 @@ class Typeset extends Controller $ts_info = $this->ts_obj->where('article_id', $article_id)->where('ts_state',0)->find(); $refers = $this->ts_refer_obj->where('ts_id', $ts_info['ts_id'])->where('refer_state', 0)->select(); foreach ($refers as $v) { //处理doi - if (strpos($v['refer_content'], 'doi:') == false && strpos($v['refer_content'], 'doi.org/') == false) { + if (strripos($v['refer_content'], 'doi:') == false && strripos($v['refer_content'], 'doi.org/') == false) { continue; } $doi = ''; - if (strpos($v['refer_content'], 'doi.org/') != false) { - $cache_arr = explode(' ', trim(substr($v['refer_content'], strpos($v['refer_content'], 'doi.org/') + 8))); + if (strripos($v['refer_content'], 'doi.org/') != false) { + $cache_arr = explode(' ', trim(substr($v['refer_content'], strripos($v['refer_content'], 'doi.org/') + 8))); if (substr($cache_arr[0], -1) == '.') { $doi = substr($cache_arr[0], 0, -1); } else { $doi = $cache_arr[0]; } } else { - $cache_arr = explode(' ', trim(substr($v['refer_content'], strpos($v['refer_content'], 'doi:') + 4))); + $cache_arr = explode(' ', trim(substr($v['refer_content'], strripos($v['refer_content'], 'doi:') + 4))); if (substr($cache_arr[0], -1) == '.') { $doi = substr($cache_arr[0], 0, -1); } else { @@ -433,6 +433,8 @@ class Typeset extends Controller $url = "http://ts.tmrjournals.com/api/typeset/webGetDocx"; // var_dump($typesetInfo);die; $res = object_to_array(json_decode(myPost1($url, $typesetInfo))); + // return jsonSuccess($res); + if(!isset($res['data']['file'])||$res['data']['file']==''){ return jsonError('create error'); } @@ -662,7 +664,7 @@ class Typeset extends Controller * 删除排版实例 */ public function delTypeSet(){ - $data = $this->require->post(); + $data = $this->request->post(); $rule = new Validate([ 'ts_id'=>'require' ]); diff --git a/application/api/controller/User.php b/application/api/controller/User.php index 521dae8..60069dc 100644 --- a/application/api/controller/User.php +++ b/application/api/controller/User.php @@ -311,6 +311,14 @@ class User extends Controller return jsonSuccess([]); } + /** + * 退订用户的广告邮件 + */ + public function unAdvertForUser($uid){ + $this->user_obj->where('user_id',$uid)->update(['is_advert'=>1]); + echo 'Unsubscribe successfully!'; + } + /** * @title 申请期刊审稿人对于审稿人 * @description 申请期刊审稿人对于审稿人 diff --git a/application/common.php b/application/common.php index 976dd48..efbf92e 100644 --- a/application/common.php +++ b/application/common.php @@ -251,6 +251,7 @@ function my_doiToFrag($data){ $cs = 1; } $ts_refer_obj->where('ts_refer_id',$data['ts_refer_id'])->update(['refer_frag'=>$f,"cs"=>$cs]); + $ts_refer_obj->close(); } diff --git a/thinkphp/library/think/db/Query.php b/thinkphp/library/think/db/Query.php index ac4adea..f544979 100644 --- a/thinkphp/library/think/db/Query.php +++ b/thinkphp/library/think/db/Query.php @@ -1038,6 +1038,10 @@ class Query return $this; } + public function close(){ + return $this->connection->close(); + } + /** * 指定OR查询条件 * @access public