作者 jinglong
1 个管道 的构建 通过 耗费 0 秒

修改头部SEO标题

... ... @@ -15,14 +15,20 @@ class Index extends Frontend
protected $limit = 20;
protected $page = 1;
protected $group = 8;//分组
protected $title = '';
protected $keys = '';
protected $description = '';
public function _initialize()
{
parent::_initialize();
//SEO标题
$title = Db::table('fa_config')->where('id',1)->find();
$this->title = $title['value'];
//SEO关键字
$keys = Db::table('fa_config')->where('id',18)->find();
$this->keys = $keys['value'];
//SEO描述
$description = Db::table('fa_config')->where('id',19)->find();
$this->description = $description['value'];
}
... ... @@ -46,7 +52,8 @@ class Index extends Frontend
}
$this->assign('custom',$arr);
//关键字,描述
//SEO标题关键字,描述
$this->assign('title',$this->title);
$this->assign('keys',$this->keys);
$this->assign('description',$this->description);
return $this->fetch();
... ... @@ -76,7 +83,8 @@ class Index extends Frontend
$this->assign('list',$news);
$this->assign('top',$top);
//关键字,描述
//SEO标题关键字,描述
$this->assign('title',$this->title);
$this->assign('keys',$this->keys);
$this->assign('description',$this->description);
return $this->fetch();
... ... @@ -110,7 +118,8 @@ class Index extends Frontend
$this->assign('hot',$hot);
$this->assign('detail',$detail);
//关键字,描述
//SEO标题关键字,描述
$this->assign('title',$this->title);
$this->assign('keys',$this->keys);
$this->assign('description',$this->description);
return $this->fetch();
... ... @@ -118,7 +127,8 @@ class Index extends Frontend
public function map()
{
//关键字,描述
//SEO标题关键字,描述
$this->assign('title',$this->title);
$this->assign('keys',$this->keys);
$this->assign('description',$this->description);
return $this->fetch();
... ... @@ -126,7 +136,8 @@ class Index extends Frontend
public function course()
{
//关键字,描述
//SEO标题关键字,描述
$this->assign('title',$this->title);
$this->assign('keys',$this->keys);
$this->assign('description',$this->description);
return $this->fetch();
... ... @@ -134,7 +145,8 @@ class Index extends Frontend
public function contact()
{
//关键字,描述
//SEO标题关键字,描述
$this->assign('title',$this->title);
$this->assign('keys',$this->keys);
$this->assign('description',$this->description);
return $this->fetch();
... ... @@ -142,7 +154,8 @@ class Index extends Frontend
public function business()
{
//关键字,描述
//SEO标题关键字,描述
$this->assign('title',$this->title);
$this->assign('keys',$this->keys);
$this->assign('description',$this->description);
return $this->fetch();
... ... @@ -150,7 +163,8 @@ class Index extends Frontend
public function about()
{
//关键字,描述
//SEO标题关键字,描述
$this->assign('title',$this->title);
$this->assign('keys',$this->keys);
$this->assign('description',$this->description);
return $this->fetch();
... ...
... ... @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="keywords" content="{$keys}">
<meta name="description" content="{$description}">
<title>关于我们</title>
<title>{$title}</title>
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/public.css">
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/about.css">
</head>
... ...
... ... @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="keywords" content="{$keys}">
<meta name="description" content="{$description}">
<title>业务介绍</title>
<title>{$title}</title>
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/public.css">
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/business.css">
</head>
... ...
... ... @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="keywords" content="{$keys}">
<meta name="description" content="{$description}">
<title>联系我们</title>
<title>{$title}</title>
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/public.css">
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/contact.css">
</head>
... ...
... ... @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="keywords" content="{$keys}">
<meta name="description" content="{$description}">
<title>课程体系</title>
<title>{$title}</title>
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/public.css">
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/course.css">
</head>
... ...
... ... @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="keywords" content="{$keys}">
<meta name="description" content="{$description}">
<title>首页</title>
<title>{$title}</title>
<meta name="viewport" content="width=1200">
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/public.css">
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/swiper/swiper.min.css">
... ...
... ... @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="keywords" content="{$keys}">
<meta name="description" content="{$description}">
<title>新闻资讯</title>
<title>{$title}</title>
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/public.css">
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/swiper/swiper.min.css">
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/news.css">
... ...
... ... @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="keywords" content="{$keys}">
<meta name="description" content="{$description}">
<title>新闻资讯</title>
<title>{$title}</title>
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/public.css">
<link rel="stylesheet" type="text/css" href="__CDN__/assets/swiper/swiper.min.css">
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/news.css">
... ...