From 5653a0869b4e84784d60c9c4190f1783c91e6c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9D=99?= Date: Wed, 19 Jan 2022 14:43:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BC=9A=E5=91=98=E7=AD=89?= =?UTF-8?q?=E7=BA=A7=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/User.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Models/User.php b/app/Models/User.php index e3c0e6f1..182ca8f5 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -195,6 +195,10 @@ class User extends Model implements AuthorizableContract, AuthenticatableContrac */ public function isVip(): bool { + if ($this->userInfo->agent_level > UserInfo::AGENT_LEVEL_VIP) { + return true; + } + return $this->userInfo?->growth_value >= config('agent.upgrade_rules.vip.sales_value'); }