You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
823 B
PHP
32 lines
823 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Http;
|
|
|
|
class XCXApiController extends Controller
|
|
{
|
|
public static function Api($url_code)
|
|
{
|
|
$url = 'https://dqgatjzx-wx.sixinyun.com';
|
|
$api['就诊人列表'] = "{$url}/PEISCommon/QueryCombos/460107000001";
|
|
$api['自选项目查询'] = "{$url}/PEISCommon/QueryGroups";
|
|
$api['套餐查询'] = "{$url}/PEISCommon/QueryCombos";
|
|
return $api["{$url_code}"] ?? $url_code;
|
|
}
|
|
public static function Post($url_code, $data)
|
|
{
|
|
$url = self::Api($url_code);
|
|
$response = Http::post($url,$data);
|
|
if ($response->successful()) {
|
|
// 处理成功的响应
|
|
dd($response);
|
|
} else {
|
|
// 处理失败的响应
|
|
dd($response);
|
|
}
|
|
}
|
|
}
|