diff --git a/extend/com/Sent.php b/extend/com/Sent.php index 12bb5eea..aacc15a9 100644 --- a/extend/com/Sent.php +++ b/extend/com/Sent.php @@ -37,7 +37,7 @@ class Sent extends \think\template\TagLib { public function tagdoc($tag, $content){ $model = !empty($tag['model']) ? $tag['model']:''; - $cid = isset($tag['cid']) ? (int) $tag['cid'] : 20; + $cid = isset($tag['cid']) ? (int) $tag['cid'] : 0; $field = empty($tag['field']) ? '*' : $tag['field']; $limit = isset($tag['limit']) ? (int) $tag['limit'] : 20; $order = empty($tag['order']) ? 'id desc' : $tag['order']; @@ -45,7 +45,7 @@ class Sent extends \think\template\TagLib { $parse = $parse = ' $'.$tag['name'].') {'; + $parse .= 'foreach ($__LIST__ as $key => $'.$name.') {'; $parse .= '?>'; $parse .= $content; $parse .= ''; diff --git a/public/template/default/front/index_index.html b/public/template/default/front/index_index.html index 50c5cc37..1d01f1a3 100644 --- a/public/template/default/front/index_index.html +++ b/public/template/default/front/index_index.html @@ -30,6 +30,9 @@ html, body {background-color: #fff; color: #636b6f; font-family: 'Raleway', sans {sent:nav tree="false" type="1" name="item"}