1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- class Demo extends Api
- {
-
-
-
-
-
- protected $noNeedLogin = ['test', 'test1'];
-
- protected $noNeedRight = ['test2'];
-
- public function test()
- {
- $data = [
- [
- 'type' => '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']);
- }
- }
|