{{item.title}}
{{item.assistantTitle}}
{{item.publishDate}}diff --git a/public/index.html b/public/index.html index 4123528..45f657b 100644 --- a/public/index.html +++ b/public/index.html @@ -4,6 +4,8 @@ + +
瑜璟缘国际文化礼仪培训
@@ -84,6 +84,9 @@ export default { handleSelect(key, keyPath) { // console.log(key, keyPath); }, + goHome() { + this.$router.push({path: "/homg"}) + } }, }; @@ -115,6 +118,7 @@ export default { // background-color: antiquewhite; margin: 5px; float: left; + cursor: pointer; img { width: 100%; height: 100%; diff --git a/src/components/sidebar/sidebar.vue b/src/components/sidebar/sidebar.vue index 198ba72..10d0efd 100644 --- a/src/components/sidebar/sidebar.vue +++ b/src/components/sidebar/sidebar.vue @@ -160,7 +160,7 @@ export default { margin-left: 10px; h3 { width: 90%; - margin: 5px; + margin: 5px 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; @@ -168,7 +168,7 @@ export default { } span { overflow: hidden; - color: rgb(214, 214, 206); + color: #999; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; diff --git a/src/page/cultivate/particulars.vue b/src/page/cultivate/particulars.vue index 73fdb31..a576bbc 100644 --- a/src/page/cultivate/particulars.vue +++ b/src/page/cultivate/particulars.vue @@ -2,11 +2,6 @@{{data.publishDate}}
@@ -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; diff --git a/src/page/home/home.vue b/src/page/home/home.vue index 8cf801b..7f918c0 100644 --- a/src/page/home/home.vue +++ b/src/page/home/home.vue @@ -324,14 +324,14 @@ export default { width: 660px; h3 { width: 90%; - margin: 5px; + margin: 5px 0; font-size: 16px; } span { height: 55px; overflow: hidden; line-height: 19px; - color: rgb(214, 214, 206); + color: #999; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; diff --git a/src/page/journalism/journalism.vue b/src/page/journalism/journalism.vue index efc3eed..f1b27dc 100644 --- a/src/page/journalism/journalism.vue +++ b/src/page/journalism/journalism.vue @@ -6,10 +6,10 @@{{item.assistantTitle}}
{{item.publishDate}}@@ -41,7 +42,6 @@