截流自动化的商城平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

SeckillGoods.php 787B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\basics\Api;
  4. use app\api\logic\SeckillGoodsLogic;
  5. use app\common\server\JsonServer;
  6. use think\response\Json;
  7. class SeckillGoods extends Api
  8. {
  9. public $like_not_need_login = ['getSeckillTime', 'getSeckillGoods'];
  10. /**
  11. * 获取秒杀时段
  12. */
  13. public function getSeckillTime()
  14. {
  15. $list = SeckillGoodsLogic::seckillTime();
  16. return JsonServer::success('', $list);
  17. }
  18. /**
  19. * 获取秒杀商品列表
  20. */
  21. public function getSeckillGoods()
  22. {
  23. $get = $this->request->get();
  24. $get['page_no'] = $this->page_no;
  25. $get['page_size'] = $this->page_size;
  26. $data = SeckillGoodsLogic::getSeckillGoods($get);
  27. return JsonServer::success('', $data);
  28. }
  29. }