UserLayout.vue 3.2 KB

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