| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\controller\api;
- use app\extra\basic\Base;
- use app\extra\dyLife\data\BaseData;
- use app\middleware\AuthMiddleware;
- use LinFly\Annotation\Attributes\Route\Controller;
- use LinFly\Annotation\Attributes\Route\GetMapping;
- use LinFly\Annotation\Attributes\Route\Middleware;
- use support\Request;
- use Webman\RedisQueue\Redis;
- #[Controller("/dy/home"),Middleware(AuthMiddleware::class)]
- class Home extends Base
- {
- /**
- * @var array|string[]
- */
- protected array $noNeedLogin = ["getHomeData"];
- #[GetMapping("data")]
- public function getHomeData(Request $request)
- {
- try {
- return $this->success("ok");
- } catch (\Throwable $th) {
- return error($th->getMessage());
- }
- }
- }
|