Commit 9f4a3903 by yanju

seo 优化

parent 323b4a6a
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
title: this.articleDetail.questionTitle + ' - 云里云外开源社区', title: this.articleDetail.questionTitle + ' - 云里云外开源社区',
meta: [ meta: [
{ hid: 'description', name: 'description', content: this.articleDetail.questionAbstract }, { hid: 'description', name: 'description', content: this.articleDetail.questionAbstract },
{ hid: 'keywords', name: 'description', content:this.tagString } { hid: 'keywords', name: 'keywords', content:this.tagString }
] ]
} }
}, },
...@@ -164,6 +164,7 @@ ...@@ -164,6 +164,7 @@
created(){ created(){
this.dataGetReAnswerList(); this.dataGetReAnswerList();
globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.questionTitle,'answer'); globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.questionTitle,'answer');
if(this.articleDetail.tags){
this.articleDetail.tags.map((val,index)=>{ this.articleDetail.tags.map((val,index)=>{
if(index<this.articleDetail.tags.length-1){ if(index<this.articleDetail.tags.length-1){
this.tagString =this.tagString + val.tagName +',' this.tagString =this.tagString + val.tagName +','
...@@ -174,6 +175,10 @@ ...@@ -174,6 +175,10 @@
} }
}) })
}else{
this.tagString = '开源项目,开源社区'
}
}, },
mounted(){ mounted(){
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
title: this.articleDetail.blogTitle + ' - 云里云外开源社区', title: this.articleDetail.blogTitle + ' - 云里云外开源社区',
meta: [ meta: [
{ hid: 'description', name: 'description', content: this.articleDetail.blogAbstract }, { hid: 'description', name: 'description', content: this.articleDetail.blogAbstract },
{ hid: 'keywords', name: 'description', content:this.tagString } { hid: 'keywords', name: 'keywords', content:this.tagString }
] ]
} }
}, },
...@@ -162,6 +162,7 @@ ...@@ -162,6 +162,7 @@
created(){ created(){
globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.blogTitle,'blog'); globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.blogTitle,'blog');
if(this.articleDetail.tags){
this.articleDetail.tags.map((val,index)=>{ this.articleDetail.tags.map((val,index)=>{
if(index<this.articleDetail.tags.length-1){ if(index<this.articleDetail.tags.length-1){
this.tagString =this.tagString + val.tagName +',' this.tagString =this.tagString + val.tagName +','
...@@ -172,6 +173,10 @@ ...@@ -172,6 +173,10 @@
} }
}) })
}else{
this.tagString = '开源项目,开源社区'
}
}, },
......
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
title: this.articleDetail.projectName + ' - 云里云外开源社区', title: this.articleDetail.projectName + ' - 云里云外开源社区',
meta: [ meta: [
{ hid: 'description', name: 'description', content: this.articleDetail.projectDescription }, { hid: 'description', name: 'description', content: this.articleDetail.projectDescription },
{ hid: 'keywords', name: 'description', content:this.tagString } { hid: 'keywords', name: 'keywords', content:this.tagString }
] ]
} }
}, },
...@@ -161,6 +161,7 @@ ...@@ -161,6 +161,7 @@
created(){ created(){
globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.projectName,'project'); globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.projectName,'project');
if(this.articleDetail.tags){
this.articleDetail.tags.map((val,index)=>{ this.articleDetail.tags.map((val,index)=>{
if(index<this.articleDetail.tags.length-1){ if(index<this.articleDetail.tags.length-1){
this.tagString =this.tagString + val.tagName +',' this.tagString =this.tagString + val.tagName +','
...@@ -171,6 +172,10 @@ ...@@ -171,6 +172,10 @@
} }
}) })
}else{
this.tagString = '开源项目,开源社区'
}
}, },
mounted(){ mounted(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment