userService = $userService; } public function index(Request $request) { // 处理首页逻辑 $params = $request->all(); $result = $this->userService->getUserList($params); return self::success($result); } public function apply(Request $request, int $id) { $res = $this->userService->apply($id); return self::success($res); } public function doApply(Request $request, int $id): JsonResponse { $params = $request->all(); $this->userService->updateApply($params, $id); return self::success(true); } /** * @throws ApiException */ public function doReApply(Request $request, int $id): JsonResponse { $params = $request->all(); $this->userService->updateReApply($params, $id); return self::success(true); } public function auth(int $id): JsonResponse { $res = $this->userService->auth($id); return self::success($res); } /** * @throws ApiException */ public function doAuth(Request $request, int $id): JsonResponse { $authData = $request->only(['name', 'idCode', 'idCard', 'authStatus', 'authText']); $this->userService->updateAuth($authData, $id); return self::success(true); } }