Quellcode durchsuchen

wesmiler 抢表商城

APPLE vor 3 Jahren
Ursprung
Commit
7c121f8552
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 3 0
      app/Services/Common/MemberService.php

+ 3 - 0
app/Services/Common/MemberService.php

@@ -166,6 +166,9 @@ class MemberService extends BaseService
             $info['bonus_total'] = round($info['bonus_total'],0);
             $info['bonus_total'] = round($info['bonus_total'],0);
             $info['mobile'] = $info['mobile']? format_mobile($info['mobile']):'';
             $info['mobile'] = $info['mobile']? format_mobile($info['mobile']):'';
             $info['show_bonus'] = GoodsService::make()->checkNewGoods($info['id']);
             $info['show_bonus'] = GoodsService::make()->checkNewGoods($info['id']);
+            if($info['show_bonus']<=0){
+                $info['bonus_total']= max(0,$info['bonus_total']-$info['bonus']);
+            }
 
 
             $info['shop_info'] = [];
             $info['shop_info'] = [];
             if(isset($info['login_shop_id']) && $info['login_shop_id']) {
             if(isset($info['login_shop_id']) && $info['login_shop_id']) {