diff --git a/app/store/controller/User.php b/app/store/controller/User.php index 25f45023..9ff14343 100644 --- a/app/store/controller/User.php +++ b/app/store/controller/User.php @@ -12,8 +12,8 @@ declare (strict_types=1); namespace app\store\controller; -use think\response\Json; use app\store\model\User as UserModel; +use think\response\Json; /** * 用户管理 @@ -60,7 +60,7 @@ class User extends Controller { // 用户详情 $model = UserModel::detail($userId); - if ($model->recharge($target, $this->postForm())) { + if ((new UserModel())->recharge($target, $this->postForm())) { return $this->renderSuccess('操作成功'); } return $this->renderError($model->getError() ?: '操作失败');