private function mhomgepagehtml() { $this->getPrecent(); $path = public_path('customers/' . $this->customer . '/mobile/index.html'); $template = new PrintController('online', 'mobile'); $template->mhomepagePreview(); file_put_contents($path, ob_get_contents()); ob_clean(); return $path; }
/** * 首页生成静态文件并返回生成文件名 * * @return string */ private function homgepagehtml($type = 'pc') { $this->getPrecent(); ob_start(); $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->homepagePreview(); } else { echo $template->mhomepagePreview(); } file_put_contents($path, ob_get_contents()); ob_end_clean(); return $path; }
/** * 手机首页预览 */ public function mhomepagePreview() { $template = new PrintController('preview', 'mobile'); return $template->mhomepagePreview(); }