| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace app\modules\admin\controllers;
- use app\models\GoodsBrandCat;
- use app\modules\admin\models\GoodsBrandCatForm;
- class GoodsBrandCatController extends BaseController
- {
- //品牌分类列表
- public function actionList() {
- $form = new GoodsBrandCatForm();
- $form->attributes = get_params();
- $form->store_id = get_store_id();
- return $this->asJson($form->list());
- }
- //添加修改品牌分类
- public function actionSave() {
- $form = new GoodsBrandCatForm();
- $form->attributes = post_params();
- $form->store_id = get_store_id();
- return $this->asJson($form->save());
- }
- //删除品牌分类
- public function actionDelete() {
- $form = new GoodsBrandCatForm();
- $form->attributes = post_params();
- $form->store_id = get_store_id();
- return $this->asJson($form->delete());
- }
- //修改品牌分类状态
- public function actionSetStatus() {
- $form = new GoodsBrandCatForm();
- $form->attributes = post_params();
- $form->store_id = get_store_id();
- return $this->asJson($form->setStatus());
- }
- //获取无页码的品牌分类
- public function actionGetBrandCatList() {
- $store_id = get_store_id();
- return $this->asJson([
- 'code' => 0,
- 'msg' => '',
- 'data' => GoodsBrandCat::getList($store_id)
- ]);
- }
- }
|