|
|
@@ -2,11 +2,6 @@ |
|
|
|
<div class="Box">
|
|
|
|
<div class="leftBox">
|
|
|
|
<textTitle :text="textTop" />
|
|
|
|
<!-- <div>
|
|
|
|
<h1 class="titels">{{this.ifjournalism==1?'中国农业银行礼仪培训':'新闻标题'}}</h1>
|
|
|
|
<p >{{this.ifjournalism==1?'培训时间:2019年3月1日':"2019年3月1日"}}</p>
|
|
|
|
<img class="particularsBox" src="../../assets/img/journalism/on2.png" alt="">
|
|
|
|
</div> -->
|
|
|
|
<div>
|
|
|
|
<h1 class="titels">{{data.title}}</h1>
|
|
|
|
<p >{{data.publishDate}}</p>
|
|
|
@@ -36,7 +31,7 @@ export default { |
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
getDetail() {
|
|
|
|
homeService.getNewsDetail(this.id).then(res => {
|
|
|
|
return homeService.getNewsDetail(this.id).then(res => {
|
|
|
|
res.publishDate = moment(res.publishDate).format("YYYY-MM-DD")
|
|
|
|
this.data = res
|
|
|
|
})
|
|
|
@@ -49,17 +44,27 @@ export default { |
|
|
|
homeService.getView(data).then(res => {})
|
|
|
|
} */
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.getDetail()
|
|
|
|
if(this.$route.params.ifjournalism){
|
|
|
|
async created() {
|
|
|
|
if (this.$route.params.ifjournalism) {
|
|
|
|
this.ifjournalism = this.$route.params.ifjournalism
|
|
|
|
console.log(this.ifjournalism);
|
|
|
|
}
|
|
|
|
if(this.ifjournalism==1){
|
|
|
|
if (this.ifjournalism == 1) {
|
|
|
|
this.textTop= "优秀案例"
|
|
|
|
}else{
|
|
|
|
this.textTop= "新闻资讯"
|
|
|
|
}
|
|
|
|
|
|
|
|
await this.getDetail()
|
|
|
|
|
|
|
|
if (this.data) {
|
|
|
|
let head = document.getElementsByTagName('head');
|
|
|
|
let meta = document.createElement('meta');
|
|
|
|
document.querySelector('meta[name="keywords"]').setAttribute('content', this.data.seoKeywords)
|
|
|
|
document.querySelector('meta[name="description"]').setAttribute('content', this.data.seoDescription)
|
|
|
|
head[0].appendChild(meta)
|
|
|
|
document.title = this.data.seoTitle
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
};
|
|
|
@@ -71,6 +76,7 @@ export default { |
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
.leftBox {
|
|
|
|
width: 75%;
|
|
|
|
p {
|
|
|
|
text-align: center;
|
|
|
|
padding: 10px;
|
|
|
|