2020-06-19 17:10:44 +08:00
|
|
|
<template>
|
|
|
|
<el-container>
|
|
|
|
<el-header>
|
2023-08-28 12:59:49 +08:00
|
|
|
<header-view v-bind="$attrs" v-on="$listeners"/>
|
2020-06-19 17:10:44 +08:00
|
|
|
</el-header>
|
|
|
|
<el-main>
|
2022-11-25 15:12:19 +08:00
|
|
|
<nuxt/>
|
2020-06-19 17:10:44 +08:00
|
|
|
</el-main>
|
2020-10-18 17:52:30 +08:00
|
|
|
<el-footer height="5rem">
|
2020-06-19 17:10:44 +08:00
|
|
|
<footer-view/>
|
|
|
|
</el-footer>
|
2020-08-02 23:55:08 +08:00
|
|
|
<div v-if="isPostArticle && isShow" style="position: fixed;bottom: 10vh;right: 3vw;">
|
|
|
|
<el-col v-if="isPostArticle" :xs="0" :xl="24">
|
|
|
|
<el-popover
|
|
|
|
placement="right"
|
|
|
|
width="20"
|
|
|
|
trigger="hover">
|
|
|
|
<el-col>
|
|
|
|
<el-image :src="gzh"></el-image>
|
|
|
|
</el-col>
|
|
|
|
<el-col class="text-center">
|
|
|
|
<span>扫码关注公众号</span>
|
|
|
|
</el-col>
|
|
|
|
<el-button slot="reference" circle><img style="width: 14px;height: 14px;" :src="wx" fit="cover"/>
|
|
|
|
</el-button>
|
|
|
|
</el-popover>
|
|
|
|
</el-col>
|
|
|
|
<el-col style="padding-top: 1rem;" :xs="0" :xl="24">
|
|
|
|
<el-button circle @click="backTop" icon="el-icon-caret-top"></el-button>
|
|
|
|
</el-col>
|
|
|
|
</div>
|
2020-06-19 17:10:44 +08:00
|
|
|
</el-container>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-08-28 12:59:49 +08:00
|
|
|
import {mapState} from 'vuex';
|
|
|
|
import HeaderView from "./header";
|
|
|
|
import FooterView from "./footer";
|
|
|
|
import wx from "~/assets/weixin.png";
|
|
|
|
import gzh from "~/assets/rymcugzh.jpg";
|
2020-06-19 17:10:44 +08:00
|
|
|
|
2023-08-28 12:59:49 +08:00
|
|
|
export default {
|
|
|
|
name: "PcMain",
|
|
|
|
components: {
|
|
|
|
HeaderView,
|
|
|
|
FooterView
|
|
|
|
},
|
|
|
|
props: [],
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
...mapState('global', []),
|
|
|
|
isPostArticle() {
|
|
|
|
if (this.$route.name === 'article-post-article_id') {
|
|
|
|
return false;
|
2020-08-02 23:55:08 +08:00
|
|
|
}
|
2023-08-28 12:59:49 +08:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
},
|
2020-08-02 23:55:08 +08:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
isShow: false,
|
|
|
|
wx: wx,
|
|
|
|
gzh: gzh
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
backTop() {
|
|
|
|
window.scrollTo(0, 0);
|
|
|
|
},
|
|
|
|
handleScroll() {
|
|
|
|
let _ts = this;
|
|
|
|
let scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
|
|
if (scrollTop > 100) {
|
|
|
|
_ts.$set(_ts, 'isShow', true);
|
|
|
|
} else {
|
|
|
|
_ts.$set(_ts, 'isShow', false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
window.addEventListener('scroll', this.handleScroll, true);
|
2020-06-19 17:10:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
2020-06-23 17:40:43 +08:00
|
|
|
.el-header {
|
2021-02-23 16:36:52 +08:00
|
|
|
/*padding-bottom: 1rem;*/
|
2023-08-28 12:59:49 +08:00
|
|
|
/*background: #fff;*/
|
2020-06-23 17:40:43 +08:00
|
|
|
border-bottom: 1px solid rgba(0, 40, 100, 0.12);
|
|
|
|
z-index: 80;
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-main {
|
2021-02-23 16:36:52 +08:00
|
|
|
padding: 0;
|
2020-06-23 17:40:43 +08:00
|
|
|
background-attachment: fixed;
|
2021-03-06 09:59:38 +08:00
|
|
|
min-height: 85vh;
|
2020-06-23 17:40:43 +08:00
|
|
|
overflow-x: hidden;
|
|
|
|
}
|
2020-06-19 17:10:44 +08:00
|
|
|
|
2020-06-23 17:40:43 +08:00
|
|
|
.el-footer {
|
2020-09-21 15:05:10 +08:00
|
|
|
position: relative;
|
2020-06-23 17:40:43 +08:00
|
|
|
width: 100%;
|
2020-09-21 15:05:10 +08:00
|
|
|
padding-top: 1.2rem;
|
2023-08-28 12:59:49 +08:00
|
|
|
/*background: #fff;*/
|
2020-06-23 17:40:43 +08:00
|
|
|
border-top: 1px solid rgba(0, 40, 100, 0.12);
|
|
|
|
z-index: 80;
|
|
|
|
}
|
2020-06-19 17:10:44 +08:00
|
|
|
</style>
|