Files
hyperf_service/app/Controller/Api/SystemController.php
2025-03-27 15:40:24 +08:00

60 lines
1.6 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Controller\Api;
use App\Controller\AbstractController;
use App\Middleware\Api\JwtAuthMiddleware;
use App\Service\Api\IndexService;
use App\Service\Api\System\CityListService;
use App\Service\Api\System\MiniWxConfigService;
use App\Service\Api\System\SiteListService;
use App\Service\Api\System\SystemConfigService;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\Middleware;
use Hyperf\HttpServer\Annotation\Middlewares;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\Validation\Annotation\Scene;
#[Controller(prefix: 'api/system')]
class SystemController extends AbstractController
{
#[RequestMapping(path: 'site/search_list',methods: 'POST')]
#[Scene(scene: 'search_list')]
public function searchSiteList()
{
return (new SiteListService)->handle();
}
#[RequestMapping(path: 'city',methods: 'GET')]
#[Scene(scene: 'city')]
public function getCityList()
{
return (new CityListService)->handle();
}
#[RequestMapping(path: 'mini_wx/about_us',methods: 'GET')]
#[Scene(scene: 'mini_wx_config')]
public function getMiniWxConfig()
{
return (new MiniWxConfigService)->handle();
}
#[RequestMapping(path: 'config',methods: 'GET')]
#[Scene(scene: 'config')]
public function systemConfig()
{
return (new SystemConfigService)->handle();
}
#[RequestMapping(path: 'index',methods: 'GET')]
#[Scene(scene: 'index')]
#[Middleware(JwtAuthMiddleware::class)]
public function index()
{
return (new IndexService)->handle();
}
}