Files
backend/app/Rpc/v1/IndexService.php
2025-06-18 10:31:43 +08:00

19 lines
518 B
PHP
Executable File

<?php
namespace App\Rpc\v1;
use App\FormModel\rpc\v1\RpcIndexModel;
use App\Rpc\BaseService;
use Hyperf\RpcServer\Annotation\RpcService;
// #[RpcService(name: "index", server: "jsonrpc-http", protocol: "jsonrpc-http", publishTo: 'nacos')]
class IndexService extends BaseService
{
public function index(): array
{
$model = new RpcIndexModel();
$data = $model->index();
$response = $this->getResponse()->setPageModule($data);
return $response->send();
}
}