123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <?php
- namespace app\api\controller;
- use app\common\controller\Api;
- class Demo extends Api
- {
-
-
-
-
-
- protected $noNeedLogin = ['test', 'test1'];
-
- protected $noNeedRight = ['test2'];
-
- public function test()
- {
- $password = 123456;
- $salt = '460dd5';
- $password = $this->auth->getEncryptPassword($password,$salt);
- echo $password;exit;
- $this->success('返回成功', $this->request->param());
- }
-
- public function test1()
- {
- $a = [
- '23' => [
- 'item_id' => 23,
- 'level' => 5,
- 'content' => '很好23',
- 'images' => [
- '/uploads/20241019/244017dc8c5a698037da7bab78da2d34.png',
- '/uploads/20241019/244017dc8c5a698037da7bab78da2d34.png'
- ],
- ],
- '24' => [
- 'item_id' => 24,
- 'level' => 4,
- 'content' => '很好24',
- 'images' => [
- '/uploads/20241019/244017dc8c5a698037da7bab78da2d34.png',
- '/uploads/20241019/244017dc8c5a698037da7bab78da2d34.png'
- ],
- ],
- ];
-
- dump(json_encode($a));
- }
-
- public function test2()
- {
- $this->success('返回成功', ['action' => 'test2']);
- }
-
- public function test3()
- {
- $this->success('返回成功', ['action' => 'test3']);
- }
- }
|