From 8c8810f08322c722ff4e319bfcabca93ef92cc86 Mon Sep 17 00:00:00 2001 From: BigCoke233 Date: Wed, 1 Apr 2020 09:48:09 +0800 Subject: =?UTF-8?q?:bulb:=20Fix:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=92=8C?= =?UTF-8?q?=E6=8A=BD=E5=B1=89=E6=A0=8F=E5=AF=BC=E8=88=AA=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Contents.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libs/Contents.php b/libs/Contents.php index 37b2555..db9bfff 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -135,14 +135,22 @@ class Contents /** * 解析自定义导航栏 */ - static public function paresNav($data) { + static public function paresNav($data, $type) { $de_json = json_decode($data, true); $count_json = count($de_json); for ($i = 0; $i < $count_json; $i++) { $title = $de_json[$i]['title']; $link = $de_json[$i]['link']; //输出导航 - echo ''. $title .''; + if($type="top-nav") { + echo ''. $title .''; + } + elseif($type="mobile") { + echo '
'. $title .'
'; + } + elseif($type="drawer") { + echo ''. $title .''; + } } } -- cgit v1.2.3