GoodsBrandController.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace app\modules\client\controllers\v1;
  3. use app\modules\client\controllers\BaseController;
  4. use app\modules\client\models\v1\GoodsBrandForm;
  5. class GoodsBrandController extends BaseController
  6. {
  7. //获取品牌列表
  8. public function actionGetBrandList() {
  9. $form = new GoodsBrandForm();
  10. $form->attributes = get_params();
  11. $form->store_id = get_store_id();
  12. $form->user_id = get_user_id();
  13. $this->asJson($form->getBrandList());
  14. }
  15. public function actionGetList() {
  16. $form = new GoodsBrandForm();
  17. $form->attributes = get_params();
  18. $form->store_id = get_store_id();
  19. $form->user_id = get_user_id();
  20. $this->asJson($form->getList());
  21. }
  22. //获取品牌分类列表
  23. public function actionGetBrandCatList() {
  24. $form = new GoodsBrandForm();
  25. $form->attributes = get_params();
  26. $form->store_id = get_store_id();
  27. $form->user_id = get_user_id();
  28. $this->asJson($form->getCatList());
  29. }
  30. //关注/取消关注品牌
  31. public function actionUserBrandSubscribe() {
  32. $form = new GoodsBrandForm();
  33. $form->attributes = post_params();
  34. $form->user_id = get_user_id();
  35. $form->store_id = get_store_id();
  36. $this->asJson($form->userBrandSubscribe());
  37. }
  38. //获取品牌详情
  39. public function actionBrandInfo() {
  40. $form = new GoodsBrandForm();
  41. $form->attributes = get_params();
  42. $form->store_id = get_store_id();
  43. $form->user_id = get_user_id();
  44. $form->md_id = get_md_id();
  45. $this->asJson($form->brandInfo());
  46. }
  47. }