feat : city
This commit is contained in:
@@ -5,22 +5,50 @@ declare(strict_types=1);
|
||||
namespace App\Controller\Admin;
|
||||
|
||||
use App\Controller\AbstractController;
|
||||
use App\Middleware\Admin\JwtAuthMiddleware;
|
||||
use App\Service\Admin\System\ConfigService;
|
||||
use App\Service\System\SystemService;
|
||||
use Hyperf\HttpServer\Annotation\Controller;
|
||||
use Hyperf\HttpServer\Annotation\Middlewares;
|
||||
use Hyperf\HttpServer\Annotation\RequestMapping;
|
||||
use Hyperf\Validation\Annotation\Scene;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use RedisException;
|
||||
|
||||
#[Controller(prefix: "admin/config")]
|
||||
#[Middlewares([
|
||||
JwtAuthMiddleware::class,
|
||||
])]
|
||||
class ConfigController extends AbstractController
|
||||
{
|
||||
#[RequestMapping(path: "module", methods: "GET")]
|
||||
public function getConfigModule()
|
||||
{
|
||||
return (new ConfigService)->getConfigModule();
|
||||
}
|
||||
|
||||
#[RequestMapping(path: "form", methods: "GET")]
|
||||
public function getConfigForm()
|
||||
{
|
||||
return (new ConfigService)->getConfigForm();
|
||||
}
|
||||
|
||||
#[RequestMapping(path: "update", methods: "POST")]
|
||||
public function updateConfig()
|
||||
{
|
||||
return (new ConfigService)->handle();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
* @throws RedisException
|
||||
*/
|
||||
#[RequestMapping(path: "system/address_list", methods: "GET")]
|
||||
public function getAddressList()
|
||||
{
|
||||
return (new SystemService)->address_list();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user