From 5b6ffbc24d97ba237022dfa03a57fc8bedf02084 Mon Sep 17 00:00:00 2001 From: cyc Date: Tue, 26 May 2020 13:54:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E9=82=AE=E4=BB=B6=E5=8F=91=E9=80=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trainsystem/controllers/api.php | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/application/third_party/trainsystem/controllers/api.php b/application/third_party/trainsystem/controllers/api.php index e80900db..5fb5f56c 100644 --- a/application/third_party/trainsystem/controllers/api.php +++ b/application/third_party/trainsystem/controllers/api.php @@ -225,6 +225,41 @@ class api extends CI_Controller{ } } + public function send_options_mail_to_wl(){ + header('Access-Control-Allow-Origin:*'); + header('Access-Control-Allow-Methods:POST, GET'); + header('Access-Control-Max-Age:0'); + header('Access-Control-Allow-Headers:x-requested-with, Content-Type'); + header('Access-Control-Allow-Credentials:true'); + $fromName = "cyc"; + $fromEmail = "cyc@hainatravel.com"; + + $order = $this->input->get_post('order'); + $person = $this->input->get_post('person'); + $type = $this->input->get_post('type'); + $request = $this->input->get_post('request'); + $body = ''; + + $coli_id = $this->BIZ_train_model->cold_sn_get_coli_id($order); + $trainInfos = $this->BIZ_train_model->biz_order_detail($order); + $passager = $this->BIZ_train_model->in_bpesn_people_info($person); + + $body .= '订单号:'.$coli_id['0']->COLI_ID.'
'; + $body .= '车程:'.$trainInfos->DepartAirport_cn.'->'.$trainInfos->ArrivalAirport_cn.','.$trainInfos->FlightsNo.','.date('Y-m-d',strtotime($trainInfos->DepartureDate)).'
'; + $body .= '乘客:'.$passager['0']->BPE_FirstName.$passager['0']->BPE_MiddleName.$passager['0']->BPE_LastName.','.$passager['0']->BPE_Passport.'
'; + $body .= '操作:'.$type.'
'; + $body .= '详细信息:'.$request.'
'; + + $toName = 'Sharon'; + $toEmail = 'Sharon@hainatravel.com'; + $subject = '用户中心操作'; + + $obj = $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); + if($obj){ + exit('{"status":"200","reason":"邮件发送成功"}'); + } + } + //导出账单api public function export_excel(){ set_time_limit(0);