|
|
@ -39,10 +39,18 @@ export default { |
|
|
|
this.$refs.header.showSearch = false |
|
|
|
this.$refs.header.showSearch = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.getSeo() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
...mapMutations('content', [ |
|
|
|
|
|
|
|
'setSite' |
|
|
|
|
|
|
|
]), |
|
|
|
// seo信息 |
|
|
|
// seo信息 |
|
|
|
this.$get(this.api.seoList, { |
|
|
|
async getSeo () { |
|
|
|
siteId: +this.$route.query.siteId || this.$store.state.content.site |
|
|
|
const siteId = +this.$route.query.siteId || (location.href.includes('eduvessel') ? 7 : 1) |
|
|
|
}).then(({ data }) => { |
|
|
|
const { data } = await this.$get(this.api.seoList, { |
|
|
|
|
|
|
|
siteId |
|
|
|
|
|
|
|
}) |
|
|
|
if (data.length) { |
|
|
|
if (data.length) { |
|
|
|
// favicon设置 |
|
|
|
// favicon设置 |
|
|
|
if (data[0].iconUrl) { |
|
|
|
if (data[0].iconUrl) { |
|
|
@ -62,12 +70,7 @@ export default { |
|
|
|
document.querySelector('meta[name="description"]').setAttribute('content', data[0].description) |
|
|
|
document.querySelector('meta[name="description"]').setAttribute('content', data[0].description) |
|
|
|
document.querySelector('title').innerHTML = data[0].title |
|
|
|
document.querySelector('title').innerHTML = data[0].title |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
...mapMutations('content', [ |
|
|
|
|
|
|
|
'setSite' |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
handleClass () { |
|
|
|
handleClass () { |
|
|
|
return this.enSite.includes(+this.$route.query.siteId || this.$store.state.content.site) |
|
|
|
return this.enSite.includes(+this.$route.query.siteId || this.$store.state.content.site) |
|
|
|
}, |
|
|
|
}, |
|
|
|