Detail.php 660 B

12345678910111213141516171819202122232425262728
  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 Detail extends Controller
  7. {
  8. protected function main()
  9. {
  10. $id = $this->getQuery()->intval("id");
  11. $u = Site::getData("user_tag");
  12. $url = sprintf(Site::getData('site_url') . "/tao.php?r=l/d&id=%s&u=%s", $id, $u);
  13. echo Dataoke::parse(file_get_contents($url));
  14. }
  15. protected function after()
  16. {
  17. $id = $this->getQuery()->intval("id");
  18. $site_url = Site::getData('site_url') . "/product/" . $id . ".html";
  19. $this->addSitemap($site_url);
  20. }
  21. }