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()
- {
- $password = 123456;
- $salt = '460dd5';
- $password = $this->auth->getEncryptPassword($password,$salt);
- echo $password;exit;
- $this->success('返回成功', $this->request->param());
- }
-
- public function test1()
- {
- $a = [
- '35' => [
- 'item_id' => 35,
- 'level' => 5,
- 'content' => '很好',
- 'images' => '/1.jpg',
- ],
-
- ];
- dump(json_encode($a));
- }
-
- public function test2()
- {
- $this->success('返回成功', ['action' => 'test2']);
- }
-
- public function test3()
- {
- $this->success('返回成功', ['action' => 'test3']);
- }
- }
|