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 . '/' ;