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