예제 #1
0
 /**
  * 首页生成静态文件并返回生成文件名
  * 
  * @return string
  */
 private function homgepagehtml($type = 'pc')
 {
     $this->getPrecent();
     ob_start();
     if ($type == 'pc') {
         $publicdata = $this->pushpc;
     } else {
         $publicdata = $this->pushmobile;
     }
     $path = $type == 'pc' ? public_path('customers/' . $this->customer . '/index.html') : public_path('customers/' . $this->customer . '/mobile/index.html');
     $template = new PrintController('online', $type);
     if ($type == 'pc') {
         echo $template->homepagePush($publicdata);
     } else {
         echo $template->mhomepagePush($publicdata);
     }
     file_put_contents($path, $ouput = ob_get_contents());
     ob_end_clean();
     // $quickbar_json=$template->quickBarJson();
     return $path;
 }