request->param(); $user_id = $this->auth->id; if (empty($params['to_user_id'])) { return $this->error('参数缺失'); } $model = new UserRemark(); if (!empty($params['remark'])) { [$res, $msg] = $model->setRemark($user_id, $params['to_user_id'], Keyworld::sensitive($params['remark'])); } else { [$res, $msg] = $model->delRemark($user_id, $params['to_user_id']); } if (!$res) { return $this->error($msg); } return $this->success($msg); } }