GoodsBrandController.php 906 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\modules\admin\controllers;
  3. use app\modules\admin\models\GoodsBrandForm;
  4. class GoodsBrandController extends BaseController
  5. {
  6. //获取品牌列表
  7. public function actionList() {
  8. $form = new GoodsBrandForm();
  9. $form->attributes = get_params();
  10. $form->store_id = get_store_id();
  11. return $this->asJson($form->getList());
  12. }
  13. //获取品牌列表
  14. public function actionSaveBrand() {
  15. $form = new GoodsBrandForm();
  16. $form->attributes = post_params();
  17. $form->store_id = get_store_id();
  18. return $this->asJson($form->saveBrand());
  19. }
  20. //设置品牌状态
  21. public function actionSetStatus() {
  22. $form = new GoodsBrandForm();
  23. $form->attributes = get_params();
  24. $form->store_id = get_store_id();
  25. return $this->asJson($form->setStatus());
  26. }
  27. }