Category.php 908 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Heanup\App\Api\Controller;
  3. use Heanup\App\Api\Config\Site;
  4. use Heanup\App\Api\Controller;
  5. use Heanup\App\Api\Model\Dataoke;
  6. class Category extends Controller
  7. {
  8. protected function main()
  9. {
  10. // $id = $this->getQuery()->intval("id");
  11. $id = $this->getQuery()->string("args_0");
  12. $page = $this->getQuery()->string("args_1");
  13. $request = [
  14. 'r' => 'l',
  15. 'site' => 'classify',
  16. 'cid' => $id,
  17. ];
  18. $bids = $this->getQuery()->string("bids");
  19. $original_id = $this->getQuery()->string("original_id");
  20. if ($bids) {
  21. $request['bids'] = $bids;
  22. }
  23. if ($original_id) {
  24. $request['original_id'] = $original_id;
  25. }
  26. $url = Site::getData('site_url') . "/tao.php?" . http_build_query($request);
  27. echo Dataoke::parse(file_get_contents($url));
  28. }
  29. }