request->post(); $token = isset($post['token']) ? trim($post['token']) : ""; if($token==""){ return error_show(101,'token不能为空'); } $effetc =VerifyTokens($token); if(!empty($effetc) && $effetc['code']!=0){ return error_show($effetc['code'],$effetc['message']); } $page = isset($post['page'])&& $post['page']!='' ? intval($post['page']) : 1; $size = isset($post['size'])&& $post['size']!='' ? intval($post['size']) : 10; $condition = ['page'=>$page,'size'=>$size]; $data = GetUserlist($token,$condition); if(!empty($data) && $data['code']!=0){ return error_show($effetc['code'],$effetc['message']); } return app_show($data['code'],$data['message'],$data['data']); } /** * 显示创建资源表单页. * * @return \think\Response */ public function create() { // } /** * 保存新建的资源 * * @param \think\Request $request * @return \think\Response */ public function save(Request $request) { // } /** * 显示指定的资源 * * @param int $id * @return \think\Response */ public function read($id) { // } /** * 显示编辑资源表单页. * * @param int $id * @return \think\Response */ public function edit($id) { // } /** * 保存更新的资源 * * @param \think\Request $request * @param int $id * @return \think\Response */ public function update(Request $request, $id) { // } /** * 删除指定资源 * * @param int $id * @return \think\Response */ public function delete($id) { // } }