| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace app\controller\api;
- use app\extra\basic\Base;
- use app\extra\dyMini\Relation;
- use app\middleware\AuthMiddleware;
- use LinFly\Annotation\Attributes\Route\Controller;
- use LinFly\Annotation\Attributes\Route\GetMapping;
- use LinFly\Annotation\Attributes\Route\Middleware;
- use LinFly\Annotation\Attributes\Route\PostMapping;
- use support\Request;
- use support\Response;
- /**
- * 解决方案回传
- */
- #[Controller("/solution")]
- class Solution extends Base
- {
- #[PostMapping("notify")]
- public function getSolutionData(Request $request): Response
- {
- try {
- $data = $request->all();
- echo getDateFull()."===扩展回调\n";
- print_r($data);
- return json(['err_no' => 0,"err_tips" => "success"]);
- } catch (\Throwable $throwable) {
- return error($throwable->getMessage());
- }
- }
- #[GetMapping("test")]
- public function setTest()
- {
- try {
- $data = (new Relation)->config($this->getDyConfig())->token()->createOrderFirst(['1865253598118939']);
- return success("ok",$data);
- } catch (\Throwable $throwable) {
- return error($throwable->getMessage());
- }
- }
- }
|