Procházet zdrojové kódy

获取所有种类

shish před 3 roky
rodič
revize
081bdc85e2
1 změnil soubory, kde provedl 14 přidání a 0 odebrání
  1. 14 0
      app-hd/controllers/KindController.php

+ 14 - 0
app-hd/controllers/KindController.php

@@ -11,6 +11,20 @@ use common\components\util;
 class KindController extends BaseController
 {
 
+    //获取所有种类 ssh 20230318
+    public function actionGetAllKind()
+    {
+        $get = Yii::$app->request->get();
+        $flower = $get['flower'] ?? '';
+        $where = [];
+        if (is_numeric($flower)) {
+            $where['flower'] = $flower;
+        }
+        $mainId = $this->mainId;
+        $list = KindClass::getAllByCondition(['mainId' => $mainId, 'flower' => $flower], null, '*');
+        util::success(['list' => $list]);
+    }
+
     //品类列表
     public function actionList()
     {