main
yanzai 6 months ago
parent adf3524402
commit 5a5751b5ad

@ -45,9 +45,13 @@ class PEISApiController extends Controller
public static function Post($url_code, $hospital_id, $data, $print = false)
{
$NeedZoneId=['套餐查询','个检预约','个检预约查询'];
$data['请求来源'] = '小程序';
$hospital = Hospital::where('id', $hospital_id)->where('del', 2)->first();
if (!$hospital) Yo::error_echo(100000, ['机构/医院']);
if(in_array($url_code, $NeedZoneId)){
$data['院区Id'] = $hospital->zone_id;
}
$code = $hospital->code;
$url = self::Api($url_code, $code);
self::RequestLog($url, $data, $code, $url_code);

@ -389,22 +389,22 @@ class UserOrderController extends Controller
'可选项目信息' => $check_items,
]);
if (count($item_check['data']) != 1) {
Yo::error_exit([
Yo::error_exit(Lu::exit([
'code' => 200045,
'message' => $item_check['message'],
'data' => [],
]);
}
}
$time_check = self::time_check($hospital, [
'索引信息列表' => [[
"序号" => 0,
"电话号码" => $person_info->phone,
"证件号码" => $person_info->id_number,
]],
'预约时间' => $time_info->date . ' ' . $time_info->start_time,
]);
if (count($time_check['data']) != 1) Yo::error_echo(200047);
]));
}
}
// $time_check = self::time_check($hospital, [
// '索引信息列表' => [[
// "序号" => 0,
// "电话号码" => $person_info->phone,
// "证件号码" => $person_info->id_number,
// ]],
// '预约时间' => $time_info->date . ' ' . $time_info->start_time,
// ]);
// if (count($time_check['data']) != 1) Yo::error_echo(200047);
if (!!$group_info) {
if (strtotime($group_info['start_time'] . ' 00:00:00') > strtotime($time_info->date . ' ' . $time_info->start_time)) Yo::error_echo(200047);
if (strtotime($group_info['end_time'] . ' 23:59:59') < strtotime($time_info->date . ' ' . $time_info->end_time)) Yo::error_echo(200047);
@ -650,15 +650,15 @@ class UserOrderController extends Controller
}
}
$time_check = self::time_check($order_info->hospital, [
'索引信息列表' => [[
"序号" => 0,
"电话号码" => $order_info->phone,
"证件号码" => $order_info->id_number,
]],
'预约时间' => $order_info->appointment_time,
]);
if (count($time_check['data']) != 1) Yo::error_echo(200047);
// $time_check = self::time_check($order_info->hospital, [
// '索引信息列表' => [[
// "序号" => 0,
// "电话号码" => $order_info->phone,
// "证件号码" => $order_info->id_number,
// ]],
// '预约时间' => $order_info->appointment_time,
// ]);
// if (count($time_check['data']) != 1) Yo::error_echo(200047);
if ($order_info->type == 1) {
$pay_status = true;
if ($order_info->pay_type == 3 && $order_info->price > 0) $pay_status = false;
@ -691,7 +691,7 @@ class UserOrderController extends Controller
$order_info->status = 2;
$order_info->pay_time = date('Y-m-d H:i:s');
if ($create_appointment['code'] != 0) Yo::error_echo(200050, [$create_appointment['message']]);
$order_info->appointment_number = $create_appointment['data'][0][0];
$order_info->appointment_number = $create_appointment['data'][0];
$appointment_info = self::appointment_info($order_info->hospital, [
'type' => $order_info->type,
"证件号码" => null,
@ -891,15 +891,15 @@ class UserOrderController extends Controller
]);
}
}
$time_check = self::time_check($order_info->hospital, [
'索引信息列表' => [[
"序号" => 0,
"电话号码" => $order_info->phone,
"证件号码" => $order_info->id_number,
]],
'预约时间' => $order_info->appointment_time,
]);
if (count($time_check['data']) != 1) Yo::error_echo(200047);
// $time_check = self::time_check($order_info->hospital, [
// '索引信息列表' => [[
// "序号" => 0,
// "电话号码" => $order_info->phone,
// "证件号码" => $order_info->id_number,
// ]],
// '预约时间' => $order_info->appointment_time,
// ]);
// if (count($time_check['data']) != 1) Yo::error_echo(200047);
$pay_type = $request->post('pay_type');
if ($order_info->true_price == 0) $pay_type = 3;
if ($order_info->true_price > 0 && $pay_type == 3) $pay_type = 1;

@ -21,10 +21,10 @@
// env = 'dev'
// env = 'dev'
const api_url = {
main: 'https://health.sixinyun.com'
main: 'http://liujiang-local'
}
if (env === 'dev') {
api_url.main = 'http://sixintijian'
api_url.main = 'http://liujiang-local'
}
const config_data = {
token_key: 'TOKEN',

Loading…
Cancel
Save