Browse Source

前台滑落红字的条件

lizhen_gitee 1 year ago
parent
commit
fddbfc88c1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      application/common/library/Auth.php

+ 2 - 1
application/common/library/Auth.php

@@ -577,10 +577,11 @@ class Auth
             'have_paid' => ['gt',0],
             'have_paid' => ['gt',0],
         ];
         ];
         $order_price_sum = Db::name('unishop_order')->where($map)->sum('order_price');
         $order_price_sum = Db::name('unishop_order')->where($map)->sum('order_price');
+        $order_price_sum = $order_price_sum ?: 0;
 
 
         $score = model('wallet')->getWallet($this->id,'score');//积分
         $score = model('wallet')->getWallet($this->id,'score');//积分
 
 
-        if($score >= $order_price_sum){
+        if($score >= $order_price_sum*2){
             return true;
             return true;
         }
         }