ZxcZxc123 1 year ago
parent
commit
dbc69d2aba
2 changed files with 3 additions and 8 deletions
  1. 2 1
      app/api/controller/PublicController.php
  2. 1 7
      app/models/user/UserBill.php

+ 2 - 1
app/api/controller/PublicController.php

@@ -58,7 +58,8 @@ class PublicController
         $promotionNumber = sys_config('promotion_number', 0);//TODO 首发新品个数
         $info['fastList'] = StoreCategory::byIndexList((int)$fastNumber, false);//TODO 快速选择分类个数
         $info['bastList'] = StoreProduct::getBestProduct('id,image,store_name,cate_id,price,ot_price,IFNULL(sales,0) + IFNULL(ficti,0) as sales,unit_name', (int)$bastNumber, $request->uid(), false);//TODO 精品推荐个数
-        $info['firstList'] = StoreProduct::getNewProduct('id,image,store_name,cate_id,price,unit_name,IFNULL(sales,0) + IFNULL(ficti,0) as sales', (int)$firstNumber, $request->uid(), false);//TODO 首发新品个数
+        //$info['firstList'] = StoreProduct::getNewProduct('id,image,store_name,cate_id,price,unit_name,IFNULL(sales,0) + IFNULL(ficti,0) as sales', (int)$firstNumber, $request->uid(), false);//TODO 首发新品个数
+        $info['firstList'] = storeproduct::getnewproduct('id,image,store_name,cate_id,price,unit_name,IFNULL(sales,0) + IFNULL(ficti,0) as sales', 1000, $request->uid(), false);
         $info['bastBanner'] = sys_data('routine_home_bast_banner') ?? [];//TODO 首页精品推荐图片
         $benefit = StoreProduct::getBenefitProduct('id,image,store_name,cate_id,price,ot_price,stock,unit_name', $promotionNumber);//TODO 首页促销单品
         $lovely = sys_data('routine_home_new_banner') ?: [];//TODO 首发新品顶部图

+ 1 - 7
app/models/user/UserBill.php

@@ -164,22 +164,16 @@ class UserBill extends BaseModel
                 $model = $model->where('type', 'brokerage')->where('pm', 1);
                 break;
             case 4:
-                $model = $model->where('type', 'brokerage,extract')->where('pm', 0);
+                $model = $model->where('type', 'extract')->where('pm', 0);
                 break;
         }
-
         if ($page) $model = $model->page((int)$page, (int)$limit);
         $list = ($list = $model->select()) ? $list->toArray() : [];
         $data = [];
         foreach ($list as $item) {
-            var_dump('2.4');
-            var_dump($item);
             $value['time'] = $item['time'];
             $value['list'] = self::where('id', 'in', $item['ids'])->field('FROM_UNIXTIME(add_time,"%Y-%m-%d %H:%i") as add_time,title,number,pm,status')->order('add_time DESC')->select();
             array_push($data, $value);
-           var_dump('2.5');
-           var_dump($value);
-
         }
         return $data;
     }