|
|
|
|
@ -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));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|