diff --git a/app/admin/controller/Set.php b/app/admin/controller/Set.php index 93ebf3b..9fdff6f 100644 --- a/app/admin/controller/Set.php +++ b/app/admin/controller/Set.php @@ -2,7 +2,7 @@ /* * @Author: TaoLer * @Date: 2021-12-06 16:04:50 - * @LastEditTime: 2022-04-22 06:30:01 + * @LastEditTime: 2022-05-10 15:00:49 * @LastEditors: TaoLer * @Description: 搜索引擎SEO优化设置 * @FilePath: \TaoLer\app\admin\controller\Set.php @@ -81,7 +81,7 @@ class Set extends AdminController public function website() { if(Request::isPost()){ - $data = Request::only(['webname','domain','template','cache','upsize','uptype','blackname','webtitle','keywords','descript','icp','showlist','copyright']); + $data = Request::only(['webname','domain','template','cache','upsize','uptype','blackname','webtitle','keywords','descript','state','icp','showlist','copyright']); $system = new System(); $result = $system->sets($data,$this->sysInfo['clevel']); if($result == 1){ diff --git a/app/admin/view/set/system/website.html b/app/admin/view/set/system/website.html index e4c48a8..32c02af 100644 --- a/app/admin/view/set/system/website.html +++ b/app/admin/view/set/system/website.html @@ -100,6 +100,12 @@ +
+ +
+ +
+
diff --git a/app/index/controller/Article.php b/app/index/controller/Article.php index 20fa6f3..a208b1c 100644 --- a/app/index/controller/Article.php +++ b/app/index/controller/Article.php @@ -73,6 +73,15 @@ class Article extends BaseController $artDetail = $article->getArtDetail($id,$page); // 设置tag内链 $artDetail['content'] = $this->setArtTagLink($artDetail['content']); + // tag + $attr = explode(',', $artDetail['tags']); + $tags = []; + foreach($attr as $v){ + if ($v !='') { + $tags[] = $v; + } + } + $arId = $artDetail['cate_id']; $tpl = Db::name('cate')->where('id',$arId)->value('detpl'); $download = $artDetail['upzip'] ? download($artDetail['upzip'],'file') : ''; @@ -97,7 +106,20 @@ class Article extends BaseController $ad_comm = $ad->getSliderList(7); $push_js = Db::name('push_jscode')->where(['delete_time'=>0])->cache(true)->select(); - View::assign(['article'=>$artDetail,'pv'=>$pv,'artHot'=>$artHot,'ad_art'=>$ad_artImg,'ad_comm'=>$ad_comm,$download,'page'=>$page,'comments'=>$comments,'jspage'=>'jie','push_js'=>$push_js]); + View::assign([ + 'article' => $artDetail, + 'pv' => $pv, + 'artHot' => $artHot, + 'ad_art' => $ad_artImg, + 'ad_comm' => $ad_comm, + 'tags' => $tags, + 'page' => $page, + 'comments' => $comments, + 'jspage' => 'jie', + 'push_js' => $push_js, + $download, + ]); + return View::fetch('article/'.$tpl.'/detail'); } @@ -250,11 +272,11 @@ class Article extends BaseController $tag = $article->tags; $attr = explode(',',$tag); $tags = []; - foreach($attr as $key => $v){ - if ($v !='') { - $tags[] = $v; - } + foreach($attr as $key => $v){ + if ($v !='') { + $tags[] = $v; } + } View::assign(['article'=>$article,'tags'=>$tags,'jspage'=>'jie']); return View::fetch(); diff --git a/view/taoler/index/article/add.html b/view/taoler/index/article/add.html index 86203ba..9b785e6 100644 --- a/view/taoler/index/article/add.html +++ b/view/taoler/index/article/add.html @@ -1,6 +1,6 @@ {extend name="public/base" /} {block name="title"}发表帖子{/block} -{block name="link"}{/block} +{block name="link"}{/block} {block name="column"}{/block} {block name="content"}
diff --git a/view/taoler/index/article/ask/cate.html b/view/taoler/index/article/ask/cate.html index fb5763f..063226f 100644 --- a/view/taoler/index/article/ask/cate.html +++ b/view/taoler/index/article/ask/cate.html @@ -1,7 +1,10 @@ {extend name="public/base" /} + {block name="title"}{$Request.param.ename|getCateName}-{$sysInfo.webname}{/block} {block name="keywords"}{$Request.param.ename|getCateName},{$sysInfo.webname}{/block} {block name="description"}{$Request.param.ename|getCateDesc}{/block} +{block name="ogtitle"}{/block} +{block name="ogdescription"}{/block} {block name="column"}{include file="/public/column" /}{/block} {block name="content"} @@ -11,9 +14,9 @@
    @@ -32,11 +35,11 @@ {/if}

    - {$art.title} + {$art.title}