GoodsController.php 932 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\modules\alliance\controllers;
  8. use app\models\Goods;
  9. use app\models\Md;
  10. use app\models\UserViews;
  11. use app\modules\alliance\controllers\BaseController;
  12. use app\modules\alliance\models\GoodsForm;
  13. use yii\base\BaseObject;
  14. class GoodsController extends BaseController
  15. {
  16. /**
  17. * 商品详情
  18. */
  19. public function actionGoods()
  20. {
  21. $form = new GoodsForm();
  22. $form->attributes = get_params();
  23. $form->store_id = $this->store_id;
  24. return $this->asJson($form->search());
  25. }
  26. /**
  27. * 获取商品优惠详情
  28. */
  29. public function actionAddress() {
  30. $form = new GoodsForm();
  31. $form->attributes = get_params();
  32. return $this->asJson($form->getAddress());
  33. }
  34. }