From 980055ef7ebe71a90090c826c7edc2d6bcbda6a6 Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Wed, 21 Sep 2022 13:12:52 +0800 Subject: [PATCH] 1 --- .env | 2 +- application/api/controller/Production.php | 31 +++++++++++++++++++++-- application/api/controller/Reviewer.php | 6 ++--- application/common.php | 1 + 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 7240bbf..2ae14cb 100644 --- a/.env +++ b/.env @@ -179,7 +179,7 @@ net = '
- This email was sent to tmr@tmrjournals.com and is specific to the recipient. + This email was sent to {{email}} and is specific to the recipient. If you have received this email in error please delete it and notify the sender immediately.
diff --git a/application/api/controller/Production.php b/application/api/controller/Production.php index 89c3e1c..c5916b0 100644 --- a/application/api/controller/Production.php +++ b/application/api/controller/Production.php @@ -189,6 +189,25 @@ class Production extends Controller return jsonSuccess($re); } + /** + * 获取生产实例列表 + */ + public function getProductionDetail(){ + $data = $this->request->post(); + $rule = new Validate([ + 'p_article_id'=>'require|number' + ]); + if(!$rule->check($data)){ + return jsonError($rule->getError()); + } + $p_info = $this->production_article_obj->where('p_article_id',$data['p_article_id'])->find(); + + + + + } + + /** * 添加作者机构 */ @@ -196,7 +215,7 @@ class Production extends Controller $data = $this->request->post(); $rule = new Validate([ 'p_article_id'=>'require|number', - 'argan_name'=>'require' + 'organ_name'=>'require' ]); if(!$rule->check($data)){ return jsonError($rule->getError()); @@ -351,7 +370,15 @@ class Production extends Controller * 上传文件 */ public function up_file(){ - + $file = request()->file('pdf'); + if ($file) { + $info = $file->move(ROOT_PATH . 'public' . DS . 'pdf'); + if ($info) { + return json(['code' => 0, 'upurl' => str_replace("\\", "/", $info->getSaveName())]); + } else { + return json(['code' => 1, 'msg' => $file->getError()]); + } + } } diff --git a/application/api/controller/Reviewer.php b/application/api/controller/Reviewer.php index 8ba3f0c..8703112 100644 --- a/application/api/controller/Reviewer.php +++ b/application/api/controller/Reviewer.php @@ -752,7 +752,7 @@ class Reviewer extends Controller $in_data['state_from'] = $article_info['state']; $in_data['state_to'] = $article_info['state']; $in_data['ctime'] = time(); - $this->article_msg_obj->insert($in_data); + // $this->article_msg_obj->insert($in_data); //记录log //生成pdf文件 @@ -1041,7 +1041,7 @@ class Reviewer extends Controller $in_data['state_from'] = $article_info['state']; $in_data['state_to'] = $article_info['state']; $in_data['ctime'] = time(); - $this->article_msg_obj->insert($in_data); + // $this->article_msg_obj->insert($in_data); $re['art_rev_id'] = $res; @@ -1082,7 +1082,7 @@ class Reviewer extends Controller $insert_data['state_from'] = $article_info['state']; $insert_data['state_to'] = $article_info['state']; $insert_data['ctime'] = time(); - $this->article_msg_obj->insert($insert_data); + // $this->article_msg_obj->insert($insert_data); $this->article_reviewer_obj->where('art_rev_id', $data['art_rev_id'])->update(['state' => 0]); return jsonSuccess([]); diff --git a/application/common.php b/application/common.php index 53d86be..ad63aa6 100644 --- a/application/common.php +++ b/application/common.php @@ -72,6 +72,7 @@ function sendEmail($email = '', $title = '', $from_name = '', $content = '', $me //组合邮件模板的头尾 $pre = Env::get('emailtemplete.pre'); $net = Env::get('emailtemplete.net'); + $net = str_replace("{{email}}",$memail,$net); $mail->msgHTML($pre.$content.$net); //Replace the plain text body with one created manually