改进 如果模块汇报价格为 0,则不强制要求余额

This commit is contained in:
iVampireSP.com 2022-11-19 22:11:57 +08:00
parent baa60d55c1
commit 7871ba709e
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -48,8 +48,10 @@ public function store(Request $request): Response|JsonResponse
//
$user = User::findOrFail($request->user_id);
if ($user->balance < 1) {
return $this->error('此用户余额不足,无法开设计费项目。');
if ($request->price > 0) {
if ($user->balance < 1) {
return $this->error('此用户余额不足,无法开设计费项目。');
}
}
// 如果没有 name则随机