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', ], /*'2' => [ 'item_id' => 2, 'level' => 4, 'content' => '很好', 'images' => '21.jpg', ],*/ ]; dump(json_encode($a)); } /** * 需要登录的接口 * */ public function test2() { $this->success('返回成功', ['action' => 'test2']); } /** * 需要登录且需要验证有相应组的权限 * */ public function test3() { $this->success('返回成功', ['action' => 'test3']); } }