|
|
@@ -51,7 +51,7 @@ class SmsLog extends BaseController |
|
|
|
$_POST = $check; |
|
|
|
unset($_POST['id']); |
|
|
|
$Customer_model = new \app\admin\model\Customer(); |
|
|
|
$Customer = $Customer_model->where('id', $check['customer_id'])->value('name'); |
|
|
|
$Customer = $Customer_model->where('id', $check['customer_id'])->field('name,phone')->find(); |
|
|
|
$_POST['create_time'] = $_SERVER['REQUEST_TIME']; |
|
|
|
$Appoint_model = new \app\admin\model\Appoint(); |
|
|
|
$hospital_id = $Appoint_model->where('id', $check['appoint_id'])->value('hospital_id'); |
|
|
@@ -60,8 +60,8 @@ class SmsLog extends BaseController |
|
|
|
if ($Hospital && $Customer) { |
|
|
|
// 爱牙呗恭喜您预约挂号成功,预约人:{1},预约时间:{2},预约医院:{3},地址:{4},电话:{5},交通说明:{6},请按照预约时间准时前往就诊,如有问题可联系我们工作人员。 |
|
|
|
$SmsConfig_model = new \app\admin\model\SmsConfig(); |
|
|
|
$data = [$Customer, date('Y-m-d H:i:s', $_POST['create_time']), $Hospital['name'], $Hospital['location'], $Hospital['reception_phone'], $Hospital['smstraffic_explain']]; |
|
|
|
$SmsConfig_model->send(17688496820, $data); |
|
|
|
$data = [$Customer['name'], date('Y-m-d H:i:s', $_POST['create_time']), $Hospital['name'], $Hospital['location'], $Hospital['reception_phone'], $Hospital['smstraffic_explain']]; |
|
|
|
$SmsConfig_model->send($Customer['phone'], $data); |
|
|
|
} |
|
|
|
$result = $SmsLog_model->save($_POST); |
|
|
|
if ($result) { |