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.

47 lines
1.6 KiB
PHP

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
namespace App\Http\Controllers\API\H5;
use App\Http\Controllers\Controller;
use App\Services\Admin\YeWu\PlanListService;
use Illuminate\Http\Request;
class PlanController extends Controller
{
public function GetEnablePlan(Request $request)
{
$regnum = request('regnum');
$entrustid = request('entrustid');
$episodeid = request('episodeid');
$appointment_type = request('appointment_type'); //预约类型
$appointment_date = request('date'); //预约日期
$userid = $request->get('userid');//中间件产生的参数
$service = new PlanListService();
return $service->GetEnablePlan($userid,$entrustid,$episodeid,$appointment_type,$appointment_date);
}
public function H5_YuYue()
{
$p=[
'planid'=>request('planid'),
'appointment_type'=>request('appointment_type'),//渠道id
'mainlistid'=>request('mainlistid'),
'do_type'=>request('do_type'),//操作类型,1预约2改约
];
foreach ($p as $key=>$value){
if(!isset($value)){
return \Yz::echoError1('参数:'.$key.' 不能为空');
}
}
$service = new PlanListService();
return $service->YuYue($p['planid'],$p['appointment_type'],$p['mainlistid'],$p['do_type']);
}
public function H5_CancelYuYue(Request $request)
{
$userid = $request->get('userid');//中间件产生的参数
$MainListId = request('MainListId');
$service = new PlanListService();
return $service->CancelYuYue($MainListId,$userid);
}
}