|
|
@@ -0,0 +1,28 @@
|
|
|
+<?php
|
|
|
+/**
|
|
|
+ * User: admin
|
|
|
+ * Date Time: 2021/4/10 14:38
|
|
|
+ */
|
|
|
+
|
|
|
+namespace pt\controllers;
|
|
|
+
|
|
|
+use biz\item\classes\PtItemCatClass;
|
|
|
+use Yii;
|
|
|
+use common\components\util;
|
|
|
+
|
|
|
+class ItemClassController extends BaseController
|
|
|
+{
|
|
|
+
|
|
|
+ public function actionList()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $type = $get['type'] ?? 0;
|
|
|
+ $where = [];
|
|
|
+ if (is_numeric($type)) {
|
|
|
+ $where['type'] = $type;
|
|
|
+ }
|
|
|
+ $list = PtItemCatClass::getCatList($where);
|
|
|
+ util::success($list);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|