UserLayout.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <div id="userLayout" :class="['user-layout-wrapper', device]">
  3. <canvas id="canvas"></canvas>
  4. <div class="container">
  5. <div class="top">
  6. <div class="header">
  7. <!-- <a href="/">
  8. <img :src="logo" class="logo" alt="logo" />
  9. </a> -->
  10. </div>
  11. <div class="desc">{{ title }}</div>
  12. </div>
  13. <route-view></route-view>
  14. <div class="footer">
  15. <!-- <div class="links">
  16. <a href="_self">帮助</a>
  17. <a href="_self">隐私</a>
  18. <a href="_self">条款</a>
  19. </div> -->
  20. <div class="copyright">
  21. Copyright &copy; {{ new Date().getFullYear() }} {{ company }}
  22. <a href="http://beian.miit.gov.cn/" target="_blank">{{ icp }}</a>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. </template>
  28. <script>
  29. import RouteView from './RouteView'
  30. import { mixinDevice } from '@/utils/mixin'
  31. import { bgStart } from '@/utils/bg/bg2'
  32. export default {
  33. name: 'UserLayout',
  34. components: { RouteView },
  35. mixins: [mixinDevice],
  36. data () {
  37. return {
  38. title: process.env.VUE_APP_PRO_NAME,
  39. company: process.env.VUE_APP_COM_NAME, // 公司
  40. icp: process.env.VUE_APP_ICP // 备案号
  41. // logo: require(process.env.VUE_APP_LOGO) // logo
  42. }
  43. },
  44. mounted () {
  45. document.body.classList.add('userLayout')
  46. bgStart()
  47. },
  48. beforeDestroy () {
  49. document.body.classList.remove('userLayout')
  50. }
  51. }
  52. </script>
  53. <style lang="less" scoped>
  54. #userLayout.user-layout-wrapper {
  55. height: 100%;
  56. overflow: hidden;
  57. &.mobile {
  58. .container {
  59. .main {
  60. max-width: 368px;
  61. width: 98%;
  62. }
  63. }
  64. }
  65. canvas {
  66. width: 100%;
  67. min-height: 100%;
  68. }
  69. .container {
  70. width: 100%;
  71. min-height: 100%;
  72. // background: #f0f2f5 url(~@/assets/background.svg) no-repeat 50%;
  73. background-size: 100%;
  74. padding: 150px 0 144px;
  75. position: absolute;
  76. left: 0;
  77. top: 0;
  78. a {
  79. text-decoration: none;
  80. }
  81. .top {
  82. text-align: center;
  83. .header {
  84. .badge {
  85. position: absolute;
  86. display: inline-block;
  87. line-height: 1;
  88. vertical-align: middle;
  89. margin-left: -12px;
  90. margin-top: -10px;
  91. opacity: 0.8;
  92. }
  93. .logo {
  94. height: 60px;
  95. vertical-align: top;
  96. border-style: none;
  97. }
  98. .title {
  99. font-size: 33px;
  100. color: rgba(0, 0, 0);
  101. font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
  102. font-weight: 600;
  103. position: relative;
  104. top: 2px;
  105. }
  106. }
  107. .desc {
  108. font-size: 24px;
  109. color: rgba(255, 255, 255, 0.8);
  110. margin-top: 5px;
  111. margin-bottom: 40px;
  112. }
  113. }
  114. .main {
  115. min-width: 260px;
  116. width: 368px;
  117. margin: 0 auto;
  118. }
  119. .footer {
  120. position: absolute;
  121. width: 100%;
  122. bottom: 0;
  123. padding: 0 16px;
  124. margin: 48px 0 24px;
  125. text-align: center;
  126. .links {
  127. margin-bottom: 8px;
  128. font-size: 14px;
  129. a {
  130. color: rgba(0, 0, 0, 0.45);
  131. transition: all 0.3s;
  132. &:not(:last-child) {
  133. margin-right: 40px;
  134. }
  135. }
  136. }
  137. .copyright {
  138. color: rgba(255, 255, 255, 0.45);
  139. font-size: 14px;
  140. a {
  141. text-decoration: none;
  142. color: rgba(255, 255, 255, 0.5);
  143. margin: 0 15px;
  144. &:hover {
  145. color: #ffffff;
  146. }
  147. }
  148. }
  149. }
  150. }
  151. }
  152. </style>