陈德本 6 tahun lalu
induk
melakukan
80f06eadc8
1 mengubah file dengan 7 tambahan dan 0 penghapusan
  1. 7 0
      App/Api/Controller/Detail.php

+ 7 - 0
App/Api/Controller/Detail.php

@@ -18,4 +18,11 @@ class Detail extends Controller
         echo Dataoke::parse(file_get_contents($url));
     }
 
+    protected function after()
+    {
+        $id = $this->getQuery()->intval("id");
+        $site_url = Site::getData('site_url') . "/product/" . $id . ".html";
+        $this->addSitemap($site_url);
+    }
+
 }