'video', 'url' => '/upload/20240712/aaaaa.mp4', ], [ 'type' => 'img', 'url' => '/upload/20240712/bbbbb.jpg', ], [ 'type' => 'video', 'url' => '/upload/20240712/ccccc.mp4', ], [ 'type' => 'img', 'url' => '/upload/20240712/ddddd.png', ], ]; echo json_encode($data); } /** * 无需登录的接口 * */ public function test1() { $this->success('返回成功', ['action' => 'test1']); } /** * 需要登录的接口 * */ public function test2() { $this->success('返回成功', ['action' => 'test2']); } /** * 需要登录且需要验证有相应组的权限 * */ public function test3() { $this->success('返回成功', ['action' => 'test3']); } }