Parcourir la source

修改完善

master
chenx il y a 2 ans
Parent
révision
b57c2632ef

+ 2
- 2
application/admin/controller/Appoint.php Voir le fichier

@@ -67,7 +67,7 @@ class Appoint extends BaseController
{
try {
$Customer_model = new \app\admin\model\Customer();
$check2 = $Customer_model->where('id', $_POST['customer_id'])->field('status,name')->find();
$check2 = $Customer_model->where('id', $_POST['customer_id'])->field('status,name,phone')->find();
if (empty($check2)) {
tojson(10000, '客户不存在');
}
@@ -100,7 +100,7 @@ class Appoint extends BaseController
// 爱牙呗恭喜您预约挂号成功,预约人:{1},预约时间:{2},预约医院:{3},地址:{4},电话:{5},交通说明:{6},请按照预约时间准时前往就诊,如有问题可联系我们工作人员。
$SmsConfig_model = new \app\admin\model\SmsConfig();
$data = [$check2['name'], date('Y-m-d H:i:s', $_POST['create_time']), $check['name'], $check['location'], $check['reception_phone'], $check['smstraffic_explain']];
$SmsConfig_model->send(17688496820, $data);
$SmsConfig_model->send($check2['phone'], $data);
}
tojson(200, '添加成功');
} catch (\Exception $e) {

+ 3
- 3
application/admin/controller/SmsLog.php Voir le fichier

@@ -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) {

Chargement…
Annuler
Enregistrer