From b1ea0af35c1acf8ff80ffcc9512cf24b575b7650 Mon Sep 17 00:00:00 2001 From: liyukun <1099438829@qq.com> Date: Sat, 7 Aug 2021 23:48:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/view/category/index.html | 4 +- app/index/controller/Article.php | 11 +-- .../template/default/pc/article/detail.html | 67 +++---------------- .../default/pc/article/list_default.html | 67 +++---------------- 4 files changed, 31 insertions(+), 118 deletions(-) diff --git a/app/admin/view/category/index.html b/app/admin/view/category/index.html index bd3341b..b635e8f 100644 --- a/app/admin/view/category/index.html +++ b/app/admin/view/category/index.html @@ -129,7 +129,7 @@ btnClass: 'btn-primary', action: function(){ $.post(url="/admin/category/del",data={"id":row.id},function (res) { - if (res.status == 200) {parent.lightyear.notify('删除成功', 'success', 3000, 'mdi mdi-emoticon-happy', 'top', 'center');$("#tree-table").bootstrapTable('refresh');} + if (res.code == 200) {parent.lightyear.notify('删除成功', 'success', 3000, 'mdi mdi-emoticon-happy', 'top', 'center');$("#tree-table").bootstrapTable('refresh');} else parent.lightyear.notify('删除失败', 'danger', 3000, 'mdi mdi-emoticon-happy', 'top', 'center'); }); } @@ -224,7 +224,7 @@ data: {field: field, value: newstate}, dataType: 'json', success: function (res) { - if (res.status == 200) {parent.lightyear.notify('修改成功', 'success', 3000, 'mdi mdi-emoticon-happy', 'top', 'center');$("#tree-table").bootstrapTable('refresh');} + if (res.code == 200) {parent.lightyear.notify('修改成功', 'success', 3000, 'mdi mdi-emoticon-happy', 'top', 'center');$("#tree-table").bootstrapTable('refresh');} else parent.lightyear.notify('修改失败', 'danger', 3000, 'mdi mdi-emoticon-happy', 'top', 'center'); }, error: function () { diff --git a/app/index/controller/Article.php b/app/index/controller/Article.php index 159087f..4e5fdf3 100644 --- a/app/index/controller/Article.php +++ b/app/index/controller/Article.php @@ -75,7 +75,7 @@ class Article extends Base //当前页面所属分类id $this->assign('cid',$id); //缓存当前页面栏目分类树ids - cache('curr_category_patent_id',$dc['parent_id']?$dc['parent_id'].','.$id:$id); + cache('curr_category_patent_id',$dc['pid']?$dc['pid'].','.$id:$id); return $this->fetch($listTmp); } @@ -112,21 +112,24 @@ class Article extends Base //更新浏览次数 $documentModel->where('id', $article['id'])->inc('view')->update(); //读取详情页模板 - $detailTmp=$dc['template_detail']; - if(!$detailTmp){ + if(empty($dc['template'])){ $this->error('请在栏目分类中,指定当前栏目的详情模板!'); } + $detailTmp=$dc['template']; if(!is_file(config('view.view_path').'article/'.$detailTmp)){ $this->error('模板文件不存在!'); } $article['category_title']=$dc['title']; + //判断SEO 为空则取系统 + $article['keywords'] = $article['keywords']?:web_config('keywords'); + $article['description'] = $article['description']?:web_config('description'); //输出文章内容 $this->assign('zzField',$article); $this->assign('id',$id); //当前页面所属分类id $this->assign('cid',$article['category_id']); //缓存当前页面栏目分类树ids - cache('CURR_CATEGORY_PATENT_ID',$dc['parent_id']?$dc['parent_id'].','.$article['category_id']:$article['category_id']); + cache('CURR_CATEGORY_PATENT_ID',$dc['pid']?$dc['pid'].','.$article['category_id']:$article['category_id']); //设置文章的url $article['link_str']=aurl($article); //判断后台统计配置是否开启 1 开启 diff --git a/public/template/default/pc/article/detail.html b/public/template/default/pc/article/detail.html index a995d87..b6e0dff 100644 --- a/public/template/default/pc/article/detail.html +++ b/public/template/default/pc/article/detail.html @@ -1,10 +1,9 @@ - 行业字典管理 - {:web_config("title")} - 轻烟随风的博客blog - - + {$zzField['title']} - {:web_config("title")} + + {include file="public/head" /} @@ -42,28 +41,25 @@
+ {$zzField['position']|raw}
-

- oracle-EBS-AP应付采购单匹配付款经历主要表(多图)

+

{$zzField['title']}