소스 검색

前台滑落红字的条件

lizhen_gitee 2 년 전
부모
커밋
fddbfc88c1
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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],
         ];
         $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');//积分
 
-        if($score >= $order_price_sum){
+        if($score >= $order_price_sum*2){
             return true;
         }