getList($nickName, $gender); return $this->fetch('index', compact('list')); } /** * 删除用户 * @param $user_id * @return array * @throws \think\exception\DbException */ public function delete($user_id) { // 用户详情 $model = UserModel::detail($user_id); if (!$model->setDelete()) { return $this->renderSuccess('删除成功'); } return $this->renderError($model->getError() ?: '删除失败'); } /** * 用户充值 * @param $user_id * @return array|bool * @throws \think\Exception * @throws \think\exception\DbException */ public function recharge($user_id) { // 用户详情 $model = UserModel::detail($user_id); if ($model->recharge($this->store['user']['user_name'], $this->postData('recharge'))) { return $this->renderSuccess('操作成功'); } return $this->renderError($model->getError() ?: '操作失败'); } }