opacity_header.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. import Stats from "@/mixins/stats";
  15. export default {
  16. components: {
  17. ProginnHeader,
  18. ProginnFooter,
  19. WxHeader
  20. },
  21. mixins: [Stats],
  22. computed: {
  23. ...mapState(["isPC", "isWeixin", "deviceType", "noneCommonFooter", "scope"])
  24. },
  25. mounted() {
  26. // console.log("this****", this);
  27. this.checkTerminal();
  28. window.addEventListener("resize", this.checkInnerWidth);
  29. },
  30. methods: {
  31. ...mapMutations(["updateIsPC", "updateIsWeixin"]),
  32. checkTerminal() {
  33. this.updateIsPC({
  34. isPC: this.$deviceType.isPC()
  35. });
  36. this.updateIsWeixin({
  37. isWeixin: window.navigator.userAgent
  38. .toLowerCase()
  39. .match(/MicroMessenger/i)
  40. });
  41. }
  42. }
  43. };
  44. </script>
  45. <style>
  46. *,
  47. *:before,
  48. *:after {
  49. box-sizing: border-box;
  50. margin: 0;
  51. }
  52. .container {
  53. display: flex;
  54. flex-direction: column;
  55. align-items: center;
  56. }
  57. .main {
  58. min-width: 1000px;
  59. min-height: calc(100vh - 376px);
  60. margin: 20px 0 30px;
  61. }
  62. .__nuxt-error-page .title {
  63. font-size: 100%;
  64. }
  65. @media screen and (max-width: 960px) {
  66. .main {
  67. min-width: auto;
  68. }
  69. }
  70. </style>