| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <template>
- <div :class="mobile ? 'mobileMain' : ''" :style="{marginTop: mainMarginTop, marginBottom: mobile ? '0px' : '30px !important'}">
- <div v-if="!mobile"></div>
- </div>
- </template>
- <script>
- import {
- mapState
- } from "vuex"
- import qs from "qs"
- export default {
- name: 'SeoLearnList',
- data() {
- return {
- baseUrl: '',
- mobile: false,
- // firstLoad: true,
- isWeixinApp: true,
- }
- },
- head() {
- const {
- title = "",
- keyword = "",
- description = "",
- h1 = "",
- canonical = "",
- metaLocation
- } = this.head || {}
- let obj = {
- title: title,
- meta: [{
- name: "keywords",
- content: keyword
- }, {
- name: "description",
- content: description
- }, {
- name: "h1",
- content: h1
- }],
- link: [{
- rel: "canonical",
- href: canonical
- }]
- }
- if (metaLocation) {
- obj.meta.push({
- name: "location",
- content: metaLocation
- })
- }
- return obj
- },
- computed: {
- ...mapState(["deviceType"]),
- showWxHeader() {
- return !this.deviceType.app && !this.isWeixinApp &&
- (this.deviceType.android || this.deviceType.ios)
- },
- mainMarginTop() {
- if (this.mobile && this.showWxHeader) {
- return '64px !important'
- } else if (this.mobile) {
- return '0px !important'
- } else {
- return '20px !important'
- }
- },
- },
- mounted() {
- this.baseUrl = this.$store.state.domainConfig.siteUrl
- this.isWeixinApp = navigator.userAgent.indexOf("miniProgram") > -1
- },
- methods: {
- }
- }
- </script>
- <style lang="scss">
- </style>
|