| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace app\controller\api;
- use app\extra\basic\Base;
- use LinFly\Annotation\Route\Controller;
- use LinFly\Annotation\Route\Route;
- use support\Request;
- use support\Response;
- #[Controller(prefix: "/wx_api/page")]
- class Page extends Base
- {
- #[Route(path: "about",methods: "get")]
- public function getAbout(Request $request)
- {
- try {
- $data = sConf("page.about");
- return json_encode(['code' => 1,'data' => $data],JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
- } catch (\Throwable $throwable) {
- return error($throwable->getMessage());
- }
- }
- #[Route(path: "privacy",methods: "get")]
- public function getPrivacy(Request $request)
- {
- try {
- $data = sConf("page.privacy");
- return json_encode(['code' => 1,'data' => $data],JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
- } catch (\Throwable $throwable) {
- return error($throwable->getMessage());
- }
- }
- #[Route(path: "agreements",methods: "get")]
- public function getAgreements(Request $request)
- {
- try {
- $data = sConf("page.agreements");
- return json_encode(['code' => 1,'data' => $data],JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
- } catch (\Throwable $throwable) {
- return error($throwable->getMessage());
- }
- }
- }
|