| 12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace pt\controllers;
- use biz\item\classes\PtItemCatClass;
- use Yii;
- use common\components\util;
- class ItemCatController 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);
- }
- //获取所有建议分类 ssh 20240127
- public function actionGetAllCat()
- {
- $list = PtItemCatClass::getAllByCondition(['type' => 0], null, '*', null);
- util::success(['list' => $list]);
- }
- }
|