UserLayout.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div id="userLayout" :class="['user-layout-wrapper', device]">
  3. <div class="container" v-if="showTitle">
  4. <div class="top" style="margin-bottom: 30px" >
  5. <div class="header">
  6. <a href="/">
  7. <img src="~@/assets/logo.png" class="logo" alt="logo" style="height: 50px" />
  8. <!-- <span class="title">Jeecg Boot</span>-->
  9. </a>
  10. </div>
  11. <!-- <div class="desc">-->
  12. <!-- Jeecg Boot 是中国最具影响力的 企业级 快速开发平台-->
  13. <!-- </div>-->
  14. </div>
  15. <route-view></route-view>
  16. <div class="footer">
  17. <!-- <div class="links">
  18. <a href="http://jeecg-boot.mydoc.io" target="_blank">帮助</a>
  19. <a href="https://github.com/zhangdaiscott/jeecg-boot" target="_blank">隐私</a>
  20. <a href="https://github.com/zhangdaiscott/jeecg-boot" target="_blank">条款</a>
  21. </div>-->
  22. <div class="copyright">Copyright &copy; 2019 上海有腾</div>
  23. </div>
  24. </div>
  25. <route-view v-else></route-view>
  26. </div>
  27. </template>
  28. <script>
  29. import RouteView from '@/components/layouts/RouteView'
  30. import { mixinDevice } from '@/utils/mixin.js'
  31. export default {
  32. name: 'UserLayout',
  33. components: { RouteView },
  34. mixins: [mixinDevice],
  35. data() {
  36. return {
  37. showTitle: true,
  38. }
  39. },
  40. mounted() {
  41. document.body.classList.add('userLayout')
  42. if (this.$route.path == '/user/new-batch'||this.$route.path=='/user/lookPreview') {
  43. this.showTitle = false
  44. } else {
  45. this.showTitle = true
  46. }
  47. },
  48. beforeDestroy() {
  49. document.body.classList.remove('userLayout')
  50. },
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. #userLayout.user-layout-wrapper {
  55. height: 100%;
  56. &.mobile {
  57. .container {
  58. .main {
  59. max-width: 368px;
  60. width: 98%;
  61. }
  62. }
  63. }
  64. .container {
  65. width: 100%;
  66. min-height: 100%;
  67. background: #f0f2f5 url(~@/assets/background.svg) no-repeat 50%;
  68. background-size: 100%;
  69. padding: 160px 0 144px;
  70. position: relative;
  71. a {
  72. text-decoration: none;
  73. }
  74. .top {
  75. text-align: center;
  76. .header {
  77. height: 44px;
  78. line-height: 44px;
  79. .badge {
  80. position: absolute;
  81. display: inline-block;
  82. line-height: 1;
  83. vertical-align: middle;
  84. margin-left: -12px;
  85. margin-top: -10px;
  86. opacity: 0.8;
  87. }
  88. .logo {
  89. height: 44px;
  90. vertical-align: top;
  91. border-style: none;
  92. }
  93. .title {
  94. font-size: 33px;
  95. color: rgba(0, 0, 0, 0.85);
  96. font-family: 'Chinese Quote', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
  97. 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
  98. 'Segoe UI Symbol';
  99. font-weight: 600;
  100. position: relative;
  101. top: 2px;
  102. }
  103. }
  104. .desc {
  105. font-size: 14px;
  106. color: rgba(0, 0, 0, 0.45);
  107. margin-top: 12px;
  108. margin-bottom: 40px;
  109. }
  110. }
  111. .main {
  112. min-width: 260px;
  113. width: 368px;
  114. margin: 0 auto;
  115. }
  116. .footer {
  117. position: absolute;
  118. width: 100%;
  119. bottom: 0;
  120. padding: 0 16px;
  121. margin: 48px 0 24px;
  122. text-align: center;
  123. .links {
  124. margin-bottom: 8px;
  125. font-size: 14px;
  126. a {
  127. color: rgba(0, 0, 0, 0.45);
  128. transition: all 0.3s;
  129. &:not(:last-child) {
  130. margin-right: 40px;
  131. }
  132. }
  133. }
  134. .copyright {
  135. color: rgba(0, 0, 0, 0.45);
  136. font-size: 14px;
  137. }
  138. }
  139. }
  140. }
  141. </style>