<?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 {

        } catch (\Throwable $throwable) {
            return error($throwable->getMessage());
        }
    }



    #[Route(path: "privacy",methods: "get")]
    public function getPrivacy(Request $request)
    {
        try {
            $data = sConf("service.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("service.agreements");
            return json_encode(['code' => 1,'data' => $data],JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
        } catch (\Throwable $throwable) {
            return error($throwable->getMessage());
        }
    }

}