Răsfoiți Sursa

显示全部花材

shish 3 ani în urmă
părinte
comite
d71ae2cdad
1 a modificat fișierele cu 6 adăugiri și 2 ștergeri
  1. 6 2
      app-hd/controllers/ProductController.php

+ 6 - 2
app-hd/controllers/ProductController.php

@@ -299,8 +299,12 @@ class ProductController extends BaseController
             $classIds = ItemClassClass::getGhsItemClassAll($mainId);
             $where['mainId'] = $mainId;
             $where['delStatus'] = 0;
-            $where['status'] = 1;
-            $where['frontHide'] = 0;
+            //是否显示全部花材,包括下架的
+            $showAll = $get['showAll'] ?? 0;
+            if ($showAll == 0) {
+                $where['status'] = 1;
+                $where['frontHide'] = 0;
+            }
 
             $level = $ghs['giveLevel'] ?? 0;
             $itemInfoData = ProductClass::getAllByCondition($where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC], "*");