diff --git a/Laravel/app/Http/Controllers/API/AspNetZhuanController.php b/Laravel/app/Http/Controllers/API/AspNetZhuanController.php index afebed2..f2c6fb8 100644 --- a/Laravel/app/Http/Controllers/API/AspNetZhuanController.php +++ b/Laravel/app/Http/Controllers/API/AspNetZhuanController.php @@ -48,6 +48,16 @@ class AspNetZhuanController extends Controller return $res['data']; } + //发送短信 + public static function SendMsg($yyid,$tel,$name,$time){ + if($yyid==1){ + $yyid=6; + } + $content="时间:".$time.";科室:健康管理中心1区。温馨提醒:您的预约已成功,请在预约时间前 30 分钟达到科室,凭身份证原件开单。建议您体检前3天清淡饮食、禁烟酒"; + $url=self::$BaseUrl."/tuisong.aspx?yyid=".$yyid."&type=8&mobile=".$tel."&msg1=".urlencode($name)."&msg2=".urlencode($content); + self::get($url,"短信发送"); + + } public static function Get($url,$mark) @@ -56,14 +66,14 @@ class AspNetZhuanController extends Controller $response = Http::get($url); if ($response->successful()) { $res = $response->json(); - + Log::info($res); self::$request->response_data = json_encode($res, JSON_UNESCAPED_UNICODE); self::$request->save(); if ($res['code'] == "200") { return $res; } else { - throw new HttpResponseException(\Yz::echoError1("查询用户积分预存款失败:" . $res['msg'])); + throw new HttpResponseException(\Yz::echoError1("调用".$mark."接口失败:" . $res['msg'])); } } else { $status = $response->status(); @@ -73,7 +83,7 @@ class AspNetZhuanController extends Controller self::$request->response_data = $body; self::$request->save(); - throw new HttpResponseException(\Yz::echoError1("查询用户积分预存款失败,status:" . $status . "body:" . $body)); + throw new HttpResponseException(\Yz::echoError1("调用".$mark."接口失败:" . $status . "body:" . $body)); } } public static function Post($url,$data,$mark) @@ -93,7 +103,7 @@ class AspNetZhuanController extends Controller if ($res['code'] == "200") { return $res; } else { - throw new HttpResponseException(\Yz::echoError1("查询用户积分预存款失败:" . $res['msg'])); + throw new HttpResponseException(\Yz::echoError1("调用".$mark."接口失败:" . $res['msg'])); } } else { $status = $response->status(); @@ -103,7 +113,7 @@ class AspNetZhuanController extends Controller self::$request->response_data = $body; self::$request->save(); - throw new HttpResponseException(\Yz::echoError1("查询用户积分预存款失败,status:" . $status . "body:" . $body)); + throw new HttpResponseException(\Yz::echoError1("调用".$mark."接口失败:" . $status . "body:" . $body)); } } diff --git a/Laravel/app/Http/Controllers/API/H5/OrderController.php b/Laravel/app/Http/Controllers/API/H5/OrderController.php index fdc31ab..c2b12cf 100644 --- a/Laravel/app/Http/Controllers/API/H5/OrderController.php +++ b/Laravel/app/Http/Controllers/API/H5/OrderController.php @@ -593,6 +593,7 @@ class OrderController extends Controller ]); $is_sendMsg=DB::table('configs')->where(['label' => '预约完成短信通知'])->first(); if(!!$is_sendMsg and $is_sendMsg->value==1){ + $asp=new AspNetZhuanController(); Tools::SendMsg($cha->hospital_id,$cha->phone,$cha->name,$cha->appointment_date.' '.substr($cha->appointment_time, 0, 5)); } return ['status' => true, 'msg' => "完成"]; diff --git a/h5/pages/main/index/index.vue b/h5/pages/main/index/index.vue index 70e520d..5fca1ac 100644 --- a/h5/pages/main/index/index.vue +++ b/h5/pages/main/index/index.vue @@ -281,7 +281,7 @@ - 10221910 + 10231704