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,16 +164,21 @@ ...@@ -164,16 +164,21 @@
created(){ created(){
this.dataGetReAnswerList(); this.dataGetReAnswerList();
globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.questionTitle,'answer'); globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.questionTitle,'answer');
this.articleDetail.tags.map((val,index)=>{ if(this.articleDetail.tags){
if(index<this.articleDetail.tags.length-1){ this.articleDetail.tags.map((val,index)=>{
this.tagString =this.tagString + val.tagName +',' if(index<this.articleDetail.tags.length-1){
this.tagString =this.tagString + val.tagName +','
}else{ }else{
this.tagString =this.tagString + val.tagName this.tagString =this.tagString + val.tagName
} }
}) })
}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,16 +162,21 @@ ...@@ -162,16 +162,21 @@
created(){ created(){
globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.blogTitle,'blog'); globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.blogTitle,'blog');
this.articleDetail.tags.map((val,index)=>{ if(this.articleDetail.tags){
if(index<this.articleDetail.tags.length-1){ this.articleDetail.tags.map((val,index)=>{
this.tagString =this.tagString + val.tagName +',' if(index<this.articleDetail.tags.length-1){
this.tagString =this.tagString + val.tagName +','
}else{ }else{
this.tagString =this.tagString + val.tagName this.tagString =this.tagString + val.tagName
} }
}) })
}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,16 +161,21 @@ ...@@ -161,16 +161,21 @@
created(){ created(){
globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.projectName,'project'); globalBus.$emit(config.event.listenDetailInfo,this.articleDetail.projectName,'project');
this.articleDetail.tags.map((val,index)=>{ if(this.articleDetail.tags){
if(index<this.articleDetail.tags.length-1){ this.articleDetail.tags.map((val,index)=>{
this.tagString =this.tagString + val.tagName +',' if(index<this.articleDetail.tags.length-1){
this.tagString =this.tagString + val.tagName +','
}else{ }else{
this.tagString =this.tagString + val.tagName this.tagString =this.tagString + val.tagName
} }
}) })
}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