Quellcode durchsuchen

修复产品BUG

moshaorui vor 1 Monat
Ursprung
Commit
b17560e56f
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      app/Distributor/Controllers/ApiController.php

+ 1 - 1
app/Distributor/Controllers/ApiController.php

@@ -22,7 +22,7 @@ class ApiController extends Controller
         if ($q != null) {
             // 模糊搜索
             $obj = new DistProduct();
-            return $obj->model()->where('title', 'like', "%$q%")->where('dist_id', getDistributorId())->paginate(null, ['id', 'title as text']);
+            return $obj->model()->where('title', 'like', "%$q%")->where('dist_id', getDistributorId())->where('status', 1)->paginate(null, ['id', 'title as text']);
         } else {
             // 获取最新的N个
             $selectOptionsNew =  DistProduct::selectOptionsNew();