| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace app\v1\controller\center;
- use app\v1\logic\center\GameLogic;
- use plugin\saiadmin\basic\BaseController;
- use app\v1\logic\center\GameMainLogic;
- use support\Request;
- use support\Response;
- /**
- * 公共接口管理控制器
- */
- class CommonController extends BaseController
- {
- protected $gameMainLogic;
- protected $gameLogic;
- /**
- * 构造函数
- */
- public function __construct()
- {
- parent::__construct();
- $this->gameMainLogic = new GameMainLogic();
- $this->gameLogic = new GameLogic();
- }
-
- /**
- * 获取主游戏options列表
- * @return Response
- */
- public function getMainGameOptions(Request $request): Response
- {
- $data = $this->gameMainLogic->getMainGameOptions();
- return $this->success($data);
- }
- /**
- * 获取子游戏options列表
- * @return Response
- */
- public function getGameOptions(Request $request): Response
- {
- $data = $this->gameLogic->getGameOptions();
- return $this->success($data);
- }
- /**
- * 获取树形游戏options列表
- * @return Response
- */
- public function getTreeGameOptions(Request $request): Response
- {
- $data = $this->gameLogic->getGameListByPermission();
- return $this->success($data);
- }
- }
|