From 2eb51e440fd2d7ba31b21a04f69c36c3956a1289 Mon Sep 17 00:00:00 2001 From: molong Date: Fri, 30 Mar 2018 11:37:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E4=BA=8E=E7=BD=91=E7=AB=99=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E5=8A=9F=E8=83=BD=E7=9A=84=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/controller/Front.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/common/controller/Front.php b/application/common/controller/Front.php index af231dce..0d8d42d2 100644 --- a/application/common/controller/Front.php +++ b/application/common/controller/Front.php @@ -12,7 +12,11 @@ class Front extends Base{ public function setThemes(){ - $theme = 'default'; + $themes['mobile'] = config('mobile_themes') ? config('mobile_themes') : 'mobile'; + $themes['pc'] = config('pc_themes') ? config('pc_themes') : 'default'; + + $theme = ($this->isMobile() && config('open_mobile_site') == '1') ? $themes['mobile'] : $themes['pc']; + $module = $this->request->module(); if ($module == 'index') { $view_path = '/template/' . $theme . '/' ;