1、解决doc标签bug(零时)
2、手机站点的开关设置
This commit is contained in:
@@ -38,7 +38,7 @@ class Fornt extends Base {
|
||||
//网站主题设置
|
||||
$themes['mobile'] = config('mobile_themes') ? config('mobile_themes') : 'mobile';
|
||||
$themes['pc'] = config('pc_themes') ? config('pc_themes') : 'default';
|
||||
$view_path = $this->isMobile() ? 'template/' . $themes['mobile'] . '/' : 'template/' . $themes['pc'] . '/';
|
||||
$view_path = ($this->isMobile() && config('open_mobile_site')) ? 'template/' . $themes['mobile'] . '/' : 'template/' . $themes['pc'] . '/';
|
||||
$module = $this->request->module();
|
||||
if (!in_array($module, array('index', 'install'))) {
|
||||
$view_path_pre = $module . '/';
|
||||
|
||||
@@ -71,6 +71,9 @@ class Document extends Base{
|
||||
}
|
||||
|
||||
public function extend($name){
|
||||
if (is_numeric($name)) {
|
||||
$name = db('Model')->where('id', $name)->value('name');
|
||||
}
|
||||
$this->extend_db = db('Document' . ucfirst($name));
|
||||
$name = strtoupper($name);
|
||||
//$this->join('__DOCUMENT_' . $name . '__', $this->fk . '=' . $this->pk, 'LEFT');
|
||||
|
||||
@@ -54,7 +54,7 @@ class Sent extends Taglib{
|
||||
$cid = !empty($tag['cid']) ? $tag['cid']:'0';
|
||||
$field = empty($tag['field']) ? '*' : $tag['field'];
|
||||
$limit = empty($tag['limit']) ? 20 : $tag['limit'];
|
||||
$order = empty($tag['order']) ? 'create_time desc' : $tag['order'];
|
||||
$order = empty($tag['order']) ? 'id desc' : $tag['order'];
|
||||
|
||||
//获得当前栏目的所有子栏目
|
||||
$ids = get_category_child($cid);
|
||||
@@ -63,7 +63,7 @@ class Sent extends Taglib{
|
||||
$where .= " and model_id = {$model} and status >= 1";
|
||||
|
||||
$parse = $parse = '<?php ';
|
||||
$parse .= '$__LIST__ = model(\'Document\')->extend(\''.$model.'\')->where(\''.$where.'\')->field(\''.$field.'\')->limit(\''.$limit.'\')->order(\''.$order.'\')->select();';
|
||||
$parse .= '$__LIST__ = model(\'Document\')->where(\''.$where.'\')->field(\''.$field.'\')->limit(\''.$limit.'\')->order(\''.$order.'\')->select();';
|
||||
$parse .= 'foreach ($__LIST__ as $key => $'.$tag['name'].') {';
|
||||
$parse .= '?>';
|
||||
$parse .= $content;
|
||||
|
||||
Reference in New Issue
Block a user