hospital-applets-api/app/Controller/IndexController.php
2023-02-17 17:10:16 +08:00

59 lines
1.2 KiB
PHP

<?php
namespace App\Controller;
use App\Model\Area;
use App\Model\Hospital;
use App\Model\TbHospitalMy;
use App\Services\IndexService;
use App\Utils\Prescription;
use Hyperf\DbConnection\Db;
use Hyperf\Snowflake\IdGeneratorInterface;
use Psr\Http\Message\ResponseInterface;
/**
* 首页
*/
class IndexController extends AbstractController
{
/**
* 医生端-首页
* @return ResponseInterface
*/
public function doctorIndex(): ResponseInterface
{
$IndexService = new IndexService();
$data = $IndexService->getDoctorIndex();
return $this->response->json($data);
}
/**
* 患者端-首页
* @return ResponseInterface
*/
public function patientIndex(): ResponseInterface
{
$IndexService = new IndexService();
$data = $IndexService->getPatientIndex();
return $this->response->json($data);
}
/**
* 医师端-首页
* @return ResponseInterface
*/
public function pharmacistIndex(): ResponseInterface
{
$IndexService = new IndexService();
$data = $IndexService->getPharmacistIndex();
return $this->response->json($data);
}
}