|
@@ -44,6 +44,7 @@
|
|
|
export default {
|
|
|
name: 'news_id',
|
|
|
layout: 'templateB',
|
|
|
+
|
|
|
async asyncData({ params, $axios, store }) {
|
|
|
// 设置选中菜单
|
|
|
store.commit('setActiveNav', '/news');
|
|
@@ -55,8 +56,7 @@
|
|
|
const res = await $axios.post(url, opt);
|
|
|
const url2 = '/home/news/newest';
|
|
|
const res2 = await $axios.post(url2);
|
|
|
-
|
|
|
-
|
|
|
+ console.log(res);
|
|
|
return {
|
|
|
infoData: res.data.data,
|
|
|
newestData: res2.data.data.data,
|
|
@@ -65,6 +65,18 @@
|
|
|
return {};
|
|
|
}
|
|
|
},
|
|
|
+ head(){
|
|
|
+ return {
|
|
|
+ title: this.infoData.keyword,
|
|
|
+ meta: [
|
|
|
+ {
|
|
|
+ hid: this.infoData.keyword,
|
|
|
+ name: 'description',
|
|
|
+ content: this.infoData.intro
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
computed: {
|
|
|
baseUrl() {
|
|
|
return this.getBaseUrl;
|