GroupingCartEvent.php 526 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Author: 芸众商城 www.yunzshop.com
  5. * Date: 2017/4/5
  6. * Time: 上午11:33
  7. */
  8. namespace app\common\events\cart;
  9. use app\common\events\Event;
  10. class GroupingCartEvent extends Event
  11. {
  12. protected $carts;
  13. public function __construct()
  14. {
  15. $params = \YunShop::request()->get();
  16. $this->carts = $params['goods'];
  17. }
  18. /**
  19. * (监听者)获取购物车model
  20. * @return mixed
  21. */
  22. public function getCarts(){
  23. return $this->carts;
  24. }
  25. }