ActivityGroupon.php 818 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace addons\shopro\controller;
  3. /**
  4. * 拼团开的团
  5. *
  6. */
  7. class ActivityGroupon extends Base
  8. {
  9. protected $noNeedLogin = ['index'];
  10. protected $noNeedRight = ['*'];
  11. /**
  12. * 根据商品 id 获取正在拼的团
  13. */
  14. public function index() {
  15. $params = $this->request->get();
  16. $this->success('团列表', \addons\shopro\model\ActivityGroupon::getActivityGroupon($params));
  17. }
  18. public function detail () {
  19. $id = $this->request->get('id');
  20. $this->success('团详情', \addons\shopro\model\ActivityGroupon::getActivityGrouponDetail($id));
  21. }
  22. public function myGroupon () {
  23. $type = $this->request->get('type', 'all');
  24. $this->success('我的拼团', \addons\shopro\model\ActivityGroupon::getMyGroupon($type));
  25. }
  26. }