修改医生列表、修改上报数据
This commit is contained in:
@@ -66,7 +66,7 @@ class Base
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
protected function httpRequest(string $sign,array $arg = []): array
|
||||
protected function httpRequest(string $sign,$path,array $arg = []): array
|
||||
{
|
||||
$option = [
|
||||
"headers" => [
|
||||
@@ -78,7 +78,7 @@ class Base
|
||||
$arg = array_merge($arg,$option);
|
||||
}
|
||||
|
||||
$response = $this->client->post($this->request_url, $arg);
|
||||
$response = $this->client->post($path, $arg);
|
||||
|
||||
if ($response->getStatusCode() != '200'){
|
||||
// 请求失败
|
||||
|
||||
+11
-2
@@ -123,6 +123,14 @@ class Wy extends Base
|
||||
// 获取签名
|
||||
$sign = $this->getSign();
|
||||
|
||||
// 获取回调地址
|
||||
$app_env = \Hyperf\Config\config("app_env",'dev');
|
||||
if ($app_env == "prod"){
|
||||
$callback_url = env('DOMAIN_NAME_PROD','https://prod.hospital.applets.igandanyiyuan.com/');
|
||||
}else{
|
||||
$callback_url = env('DOMAIN_NAME_DEV','https://dev.hospital.applets.igandanyiyuan.com/');
|
||||
}
|
||||
|
||||
$arg = array();
|
||||
$arg['appId'] = $this->app_id;
|
||||
$arg['orderCode'] = $order_detection['detection_no']; // 订单编号
|
||||
@@ -143,14 +151,15 @@ class Wy extends Base
|
||||
$arg['projectPurpose'] = $detection_project_purpose['purpose_name']; // 检测项目用途名称
|
||||
$arg['payTime'] = $order_detection['pay_time']; // 支付时间
|
||||
$arg['payAmount'] = $order_detection['payment_amount_total']; // 支付金额
|
||||
$arg['reportUrl'] = $this->request_url; // 推送报告的回调地址
|
||||
$arg['reportUrl'] = $callback_url . "callback/detection"; // 推送报告的回调地址
|
||||
|
||||
$option = [
|
||||
"json" => $arg
|
||||
];
|
||||
|
||||
$path = $this->request_url . "api/sdInternet/v1/externalData/saveOrder";
|
||||
try {
|
||||
$response = $this->httpRequest($sign,$option);
|
||||
$response = $this->httpRequest($sign,$path,$option);
|
||||
if (empty($response)){
|
||||
// 返回值错误为空
|
||||
throw new BusinessException("");
|
||||
|
||||
Reference in New Issue
Block a user