Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-11-04 16:52:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7ef88cf702025992094e4c7d4a5d0b4de2360cd3
7ef88cf7
1 parent
eda90de8
网站标题显示优化
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
25 deletions
src/App.vue
src/common/mixin.js
src/route.js
src/views/product/detail.vue
src/views/product/index.vue
src/App.vue
View file @
7ef88cf
<!--
* @Date: 2024-09-26 13:36:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-04 1
4:02:06
* @LastEditTime: 2024-11-04 1
6:43:27
* @FilePath: /hager/src/App.vue
* @Description: 文件描述
-->
...
...
@@ -23,7 +23,7 @@ import mixin from '@/common/mixin';
export default {
// TAG:配置页面meta和标题信息
metaInfo: {
title: '海格电气官方网站',
//
title: '海格电气官方网站',
meta: [
{ name: 'keyword', content: '海格集团是全球领先的电气及智能化解决方案和服务提供商,应用领域涵盖住宅、商业建筑、公共建筑和工业。海格电气品牌代表了集团的核心业务,覆盖配电系统、电缆管理系统,KNX 智能控制系统和开关面板、楼宇自动化和安防系统。' },
{ name: 'description', content: '构建未来电气世界 让人们的生活更安全、更清洁、更愉悦。' },
...
...
src/common/mixin.js
View file @
7ef88cf
/*
* @Date: 2022-07-26 09:49:54
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-04 1
1:27:34
* @LastEditTime: 2024-11-04 1
6:43:21
* @FilePath: /hager/src/common/mixin.js
* @Description: 文件描述
*/
...
...
@@ -12,7 +12,7 @@ export default {
// 初始化设置
init
:
{
mounted
()
{
//
document.title = this.$route.meta.title;
document
.
title
=
this
.
$route
.
meta
.
title
;
// 页面进入时获取当前屏幕宽度
this
.
handleResize
();
// 监听窗口的 resize 事件
...
...
src/route.js
View file @
7ef88cf
/*
* @Date: 2024-08-26 10:42:15
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-04 1
2:50:25
* @LastEditTime: 2024-11-04 1
6:51:13
* @FilePath: /hager/src/route.js
* @Description: 文件描述
*/
...
...
@@ -10,7 +10,7 @@ export default [{
name
:
'首页'
,
component
:
()
=>
import
(
'@/views/index'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
首页 | Hager China
'
,
tag
:
'index'
},
children
:
[]
...
...
@@ -64,7 +64,7 @@ export default [{
name
:
'关于海格'
,
component
:
()
=>
import
(
'@/views/about'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
关于海格 | Hager China
'
,
tag
:
'about'
},
children
:
[]
...
...
@@ -73,7 +73,7 @@ export default [{
name
:
'海格全球'
,
component
:
()
=>
import
(
'@/views/about/global'
),
meta
:
{
title
:
'海格
电气
'
,
title
:
'海格
全球 | Hager China
'
,
tag
:
'about'
},
children
:
[]
...
...
@@ -82,7 +82,7 @@ export default [{
name
:
'海格电气在中国'
,
component
:
()
=>
import
(
'@/views/about/china'
),
meta
:
{
title
:
'海格电气'
,
title
:
'海格电气
在中国 | Hager China
'
,
tag
:
'about'
},
children
:
[]
...
...
@@ -91,7 +91,7 @@ export default [{
name
:
'创新设计'
,
component
:
()
=>
import
(
'@/views/about/design'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
创新设计 | Hager China
'
,
tag
:
'about'
},
children
:
[]
...
...
@@ -100,7 +100,7 @@ export default [{
name
:
'生产研发'
,
component
:
()
=>
import
(
'@/views/about/product'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
生产研发 | Hager China
'
,
tag
:
'about'
},
children
:
[]
...
...
@@ -109,7 +109,7 @@ export default [{
name
:
'可持续发展'
,
component
:
()
=>
import
(
'@/views/about/development'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
可持续发展 | Hager China
'
,
tag
:
'about'
},
children
:
[]
...
...
@@ -118,7 +118,7 @@ export default [{
name
:
'荣誉展示'
,
component
:
()
=>
import
(
'@/views/about/honors'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
荣誉展示 | Hager China
'
,
tag
:
'about'
},
children
:
[]
...
...
@@ -127,7 +127,7 @@ export default [{
name
:
'联系我们'
,
component
:
()
=>
import
(
'@/views/concat'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
联系我们 | Hager China
'
,
tag
:
'concat'
},
children
:
[]
...
...
@@ -136,7 +136,7 @@ export default [{
name
:
'新闻中心'
,
component
:
()
=>
import
(
'@/views/news/index'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
新闻中心 | Hager China
'
,
tag
:
'news'
},
children
:
[]
...
...
@@ -145,7 +145,7 @@ export default [{
name
:
'新闻详情'
,
component
:
()
=>
import
(
'@/views/news/detail'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
新闻详情 | Hager China
'
,
tag
:
'news'
},
children
:
[]
...
...
@@ -154,7 +154,7 @@ export default [{
name
:
'招聘信息'
,
component
:
()
=>
import
(
'@/views/recruit'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
招聘信息 | Hager China
'
,
tag
:
'recruit'
},
children
:
[]
...
...
@@ -163,7 +163,7 @@ export default [{
name
:
'用户管理'
,
component
:
()
=>
import
(
'@/views/user/index'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
用户管理 | Hager China
'
,
tag
:
'user'
},
children
:
[
...
...
@@ -172,7 +172,7 @@ export default [{
name
:
'用户登录'
,
component
:
()
=>
import
(
'@/views/user/login'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
用户登录 | Hager China
'
,
tag
:
'login'
},
},
...
...
@@ -181,7 +181,7 @@ export default [{
name
:
'用户注册'
,
component
:
()
=>
import
(
'@/views/user/register'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
用户注册 | Hager China
'
,
tag
:
'register'
},
},
...
...
@@ -190,7 +190,7 @@ export default [{
name
:
'用户信息'
,
component
:
()
=>
import
(
'@/views/user/info'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
用户信息 | Hager China
'
,
tag
:
'info'
},
},
...
...
@@ -199,7 +199,7 @@ export default [{
name
:
'密码重置'
,
component
:
()
=>
import
(
'@/views/user/reset'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
密码重置 | Hager China
'
,
tag
:
'reset'
},
},
...
...
@@ -209,7 +209,7 @@ export default [{
name
:
'搜索结果'
,
component
:
()
=>
import
(
'@/views/search'
),
meta
:
{
title
:
'
海格电气
'
,
title
:
'
搜索结果 | Hager China
'
,
tag
:
'search'
},
children
:
[]
...
...
src/views/product/detail.vue
View file @
7ef88cf
<!--
* @Date: 2024-09-29 14:26:41
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-0
1 18:35:31
* @LastEditTime: 2024-11-0
4 16:48:49
* @FilePath: /hager/src/views/product/detail.vue
* @Description: 文件描述
-->
...
...
@@ -250,6 +250,8 @@ export default {
break;
}
}
// 设置页面标题
document.title = this.info.product_name + ' | Hager China';
}
},
onClick (v) {
...
...
src/views/product/index.vue
View file @
7ef88cf
<!--
* @Date: 2024-09-27 16:53:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-0
1 17:43:50
* @LastEditTime: 2024-11-0
4 16:48:01
* @FilePath: /hager/src/views/product/index.vue
* @Description: 文件描述
-->
...
...
@@ -123,6 +123,8 @@ export default {
// 获取当前类别的内容
this.cate_id = info.category_parent ? info.category_parent : info.id; // 同一个值,在不同层级下名字不一样
this.getCurrentCate(this.cate_id);
// 设置页面标题
document.title = this.category_name + ' | Hager China';
}
},
async getCurrentCate (cate_id) {
...
...
Please
register
or
login
to post a comment