<template>
  <div id="userLayout" :class="['user-layout-wrapper', device]">
    <div class="container">
      <!-- 萃颠logo -->
      <div class="logo">
        <img src="../../assets/logo-blue.png" alt="" />
      </div>

      <!-- 放表单的盒子 -->
      <div class="formBox">
        <img src="../../assets/white-bg.png" alt="" />
        <route-view></route-view>
      </div>
    </div>
  </div>
</template>

<script>
import RouteView from '@/components/layouts/RouteView'
import { mixinDevice } from '@/utils/mixin.js'

export default {
    name: 'UserLayout',
    components: { RouteView },
    mixins: [mixinDevice],
    data () {
        return {}
    },
    mounted () {
        document.body.classList.add('userLayout')
    },
    beforeDestroy () {
        document.body.classList.remove('userLayout')
    }
}
</script>

<style lang="less" scoped>
#userLayout.user-layout-wrapper {
  height: 100%;

  &.mobile {
    .container {
      .main {
        max-width: 368px;
        width: 98%;
      }
    }
  }

  .container {
    width: 100%;
    min-height: 100%;
    background-image: url('../../assets/bg.png');
    padding: 110px 0 144px;
    position: relative;
    .main {
      position: absolute;
      top: 20%;
      left: 58%;
    }
    .logo {
      position: absolute;
      top: 18px;
      left: 42px;
      z-index: 88888;
    }
    // 放表单的背景
    .formBox {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
    }

    a {
      text-decoration: none;
    }
    .main {
      min-width: 260px;
      width: 368px;
    }
  }
}
</style>
