wesmiler 2 ماه پیش
والد
کامیت
bcb4e07ea6
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      app/Http/Controllers/Api/v1/IndexController.php

+ 1 - 1
app/Http/Controllers/Api/v1/IndexController.php

@@ -119,6 +119,7 @@ class IndexController extends webApp
             $data = [
             $data = [
                 // 轮播
                 // 轮播
                 'banners' => AdService::make()->getListByPosition($position),
                 'banners' => AdService::make()->getListByPosition($position),
+                'cart_count' => CartService::make()->getCount($this->userId)
             ];
             ];
 
 
             if ($type == 2) {
             if ($type == 2) {
@@ -131,7 +132,6 @@ class IndexController extends webApp
                 $params['user_id'] = $this->userId;
                 $params['user_id'] = $this->userId;
                 $data['stores'] = StoreService::make()->getGoodsList($params);
                 $data['stores'] = StoreService::make()->getGoodsList($params);
                 $data['social_open'] = ConfigService::make()->getConfigByCode('social_open', 0);
                 $data['social_open'] = ConfigService::make()->getConfigByCode('social_open', 0);
-                $data['cart_count'] = CartService::make()->getCount($this->userId);
                 $data['pay_recharge_open'] = ConfigService::make()->getConfigByCode('pay_recharge_open', 0);
                 $data['pay_recharge_open'] = ConfigService::make()->getConfigByCode('pay_recharge_open', 0);
             }
             }