diff --git a/app/model/Post.php b/app/model/Post.php index 20ddfc9..4e6a130 100644 --- a/app/model/Post.php +++ b/app/model/Post.php @@ -151,9 +151,10 @@ class Post extends Model return ''; } - $base_dir = App::getRootPath() . '/demo/'; + $base_dir = App::getRootPath() . '/demo/' . $this->getAttr('category')->getData('tpl_name') . '/'; $file_path = $base_dir . $this->getData('tpl_name') . '.html'; + if (!file_exists($file_path)) { return ''; } @@ -190,7 +191,7 @@ class Post extends Model if (empty($model_post) || $clear) { $model_post = Post::find($id); - Cache::set($cache_key, $model_post, 600); + Cache::set($cache_key, $model_post, get_system_config('cache_expire_time')); } return $model_post; diff --git a/config/view_type.php b/config/view_type.php index 93933a4..29a52fb 100644 --- a/config/view_type.php +++ b/config/view_type.php @@ -2,9 +2,11 @@ return [ 'category' => [ - '' => '普通:', + '' => '普通', + 'pc' => '电脑端', + 'mb' => '移动端', ], 'post' => [ - '' => '普通:', + '' => '普通', ] ]; diff --git a/demo/mb/nav.html b/demo/mb/nav.html new file mode 100644 index 0000000..bbeba6c --- /dev/null +++ b/demo/mb/nav.html @@ -0,0 +1,28 @@ +
\ No newline at end of file diff --git a/demo/blockquote.html b/demo/pc/blockquote.html similarity index 100% rename from demo/blockquote.html rename to demo/pc/blockquote.html diff --git a/demo/card.html b/demo/pc/card.html similarity index 100% rename from demo/card.html rename to demo/pc/card.html diff --git a/demo/files.html b/demo/pc/files.html similarity index 100% rename from demo/files.html rename to demo/pc/files.html diff --git a/demo/form.html b/demo/pc/form.html similarity index 100% rename from demo/form.html rename to demo/pc/form.html diff --git a/demo/group_panel.html b/demo/pc/group_panel.html similarity index 100% rename from demo/group_panel.html rename to demo/pc/group_panel.html diff --git a/demo/header.html b/demo/pc/header.html similarity index 100% rename from demo/header.html rename to demo/pc/header.html diff --git a/demo/list.html b/demo/pc/list.html similarity index 100% rename from demo/list.html rename to demo/pc/list.html diff --git a/demo/nav.html b/demo/pc/nav.html similarity index 100% rename from demo/nav.html rename to demo/pc/nav.html diff --git a/demo/none.html b/demo/pc/none.html similarity index 100% rename from demo/none.html rename to demo/pc/none.html diff --git a/demo/photo.html b/demo/pc/photo.html similarity index 100% rename from demo/photo.html rename to demo/pc/photo.html diff --git a/demo/search.html b/demo/pc/search.html similarity index 100% rename from demo/search.html rename to demo/pc/search.html diff --git a/demo/title.html b/demo/pc/title.html similarity index 100% rename from demo/title.html rename to demo/pc/title.html diff --git a/demo/tree.html b/demo/pc/tree.html similarity index 100% rename from demo/tree.html rename to demo/pc/tree.html diff --git a/public/cdn/layui-ul-mb.css b/public/cdn/layui-ul-mb.css new file mode 100644 index 0000000..582a5b5 --- /dev/null +++ b/public/cdn/layui-ul-mb.css @@ -0,0 +1,49 @@ +.ul-mb-ui-container{ + width: 300px; + max-height: 500px; + overflow: scroll; +} + +.ul-mb-nav-group-card{ + +} + +.ul-mb-nav-group-card-title{ + font-weight: 600; + line-height: 2; + font-size: 16px; +} +.ul-mb-nav-group-card-list{ + display: flex; + align-items: flex-start; + justify-content: space-between; + flex-wrap: wrap; +} +.ul-mb-nav-group-card-item{ + display: flex; + align-items: center; + justify-content: flex-start; + background-color: #fff; + border-radius: 3px; + padding: 8px; + margin-bottom: 15px; + width: 42%; +} + +.ul-mb-nav-group-card-item-icon{ + width: 50px; + height: 50px; + background-position: center; + background-size: cover; + margin-right: 8px; + +} +.ul-mb-nav-group-card-item-title{ + line-height: 2; + font-size: 14px; +} + +.ul-mb-nav-group-card-item-desc{ + color: #999; + font-size: 12px; +} \ No newline at end of file diff --git a/view/admin/system/index.html b/view/admin/system/index.html index f426456..22eab3c 100644 --- a/view/admin/system/index.html +++ b/view/admin/system/index.html @@ -111,6 +111,13 @@ class="layui-input"> +