opacity_header_kf_tmp.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div class="container" id="markIsAppWebview" :data-app="deviceType.app" :class="scope ? ['scoped-view', scope] : []">
  3. <proginn-header v-if="deviceType.pc" transparent="true" />
  4. <wx-header v-else-if="!deviceType.app"></wx-header>
  5. <nuxt class="main" />
  6. <proginn-footer v-if="deviceType.pc && !noneCommonFooter" />
  7. </div>
  8. </template>
  9. <script>
  10. import ProginnHeader from "@/components/header";
  11. import ProginnFooter from "@/components/footer";
  12. import WxHeader from "@/components/wx_header";
  13. import { mapState, mapMutations } from "vuex";
  14. export default {
  15. components: {
  16. ProginnHeader,
  17. ProginnFooter,
  18. WxHeader
  19. },
  20. computed: {
  21. ...mapState(["isPC", "isWeixin", "deviceType", "noneCommonFooter", "scope"])
  22. },
  23. mounted() {
  24. // console.log("this****", this);
  25. this.checkTerminal();
  26. window.addEventListener("resize", this.checkInnerWidth);
  27. },
  28. methods: {
  29. ...mapMutations(["updateIsPC", "updateIsWeixin"]),
  30. checkTerminal() {
  31. this.updateIsPC({
  32. isPC: this.$deviceType.isPC()
  33. });
  34. this.updateIsWeixin({
  35. isWeixin: window.navigator.userAgent
  36. .toLowerCase()
  37. .match(/MicroMessenger/i)
  38. });
  39. }
  40. }
  41. };
  42. </script>
  43. <style>
  44. *,
  45. *:before,
  46. *:after {
  47. box-sizing: border-box;
  48. margin: 0;
  49. }
  50. .container {
  51. display: flex;
  52. flex-direction: column;
  53. align-items: center;
  54. }
  55. .main {
  56. min-width: 1000px;
  57. min-height: calc(100vh - 376px);
  58. margin: 20px 0 30px;
  59. }
  60. .__nuxt-error-page .title {
  61. font-size: 100%;
  62. }
  63. @media screen and (max-width: 960px) {
  64. .main {
  65. min-width: auto;
  66. }
  67. }
  68. </style>