<template>
  <div id="userLayout" :class="['user-layout-wrapper', device]">
    <div class="container">
      <!--      <div ref='vantaRef' style="left: 0%;
          width: 99%;
          height: 99%;
          position: absolute;
          top: 0%;">
            </div>-->

      <div class="aui-container">
        <div class="aui-form">
          <!--          左面图片-->
          <div class="aui-image">
            <div style="position: absolute;top: 33%">
              <img style="width: 150px;height: 150px;border-radius:50%" src="../../../public/logo.png"/>
            </div>
            <div class="aui-image-text" style="top: 44%;left: 26%;width: 100%;position: absolute;">
              <div style="color: white;font-weight: 600;font-size: 24px;}">共建反诈防线，守护财产安全</div>
            </div>
          </div>

          <div class="aui-formBox">
            <div class="top">
              <div class="header" style="">
                <a href="/">
                  <!--            <img src="~@/assets/telecom.png" class="logo" alt="logo">-->
                  <span class="title" style="color: #1890FF">智慧运营系统</span>
                </a>
              </div>
              <div class="desc">
              </div>
            </div>

            <route-view></route-view>

            <div class="footer">

            </div>

          </div>


        </div>
      </div>


    </div>
  </div>

</template>

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

import * as THREE from 'three'
import BIRDS from 'vanta/src/vanta.birds'

export default {
  name: "UserLayout",
  components: {RouteView},
  mixins: [mixinDevice],
  data() {
    return {}
  },
  mounted() {
    document.body.classList.add('userLayout')
    this.vantaEffect = BIRDS({
      el: this.$refs.vantaRef,
      THREE: THREE
    })
    this.vantaEffect.setOptions({
      color: 0x3fc6ff,
      color2: 0xf2089f,
      mouseControls: false,
      touchControls: false,
      gyroControls: false,
      backgroundAlpha: 0.00,
      minHeight: 200.00,
      minWidth: 200.00,
      scale: 1.00,
      scaleMobile: 1.00,
      birdSize: 1.10,
      wingSpan: 10.00,
      speedLimit: 0.10,
      quantity: 4.00
    })
  },
  beforeDestroy() {
    if (this.vantaEffect) {
      this.vantaEffect.destroy()
    }
    document.body.classList.remove('userLayout')
  },
}
</script>

<style lang="less" scoped>
.aui-formBox {
  flex-basis: 40%;
  -webkit-flex-basis: 40%;
  box-sizing: border-box;
  padding: 30px 20px;
  background: #fff;
  box-shadow: 2px 9px 49px -17px #0000001a;
}

.aui-image-text {
  top: 50%;
  left: 50%;
  width: 100%;
}

.aui-image {
  padding: 250px 80px;
  flex-basis: 60%;
  -webkit-flex-basis: 60%;
  background-color: #0198cd;
  background-image: url(../../assets/20140727123732_UdfWT.jpeg);
  background-size: cover;
}

.aui-form {
  width: 100%;
  background: #eee;
  display: flex
}

.aui-container {
  max-width: 1000px;
  margin: 0 auto;
  box-shadow: 0 4px 8px 1px #0003;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 92%;
  height: auto;
  transform: translate(-50%) translateY(-50%);
  -webkit-transform: translateX(-50%) translateY(-50%);
}


#userLayout.user-layout-wrapper {
  height: 100%;

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

  .container {
    width: 100%;
    min-height: 100%;
    //background: #f0f2f5 url(~@/assets/background.svg) no-repeat 50%;
    background: rgb(240, 242, 245);
    background-size: 100%;
    padding: 110px 0 144px;
    position: relative;

    a {
      text-decoration: none;
    }

    .top {
      text-align: center;

      .header {
        height: 44px;
        line-height: 44px;

        .badge {
          position: absolute;
          display: inline-block;
          line-height: 1;
          vertical-align: middle;
          margin-left: -12px;
          margin-top: -10px;
          opacity: 0.8;
        }

        .logo {
          height: 44px;
          vertical-align: top;
          margin-right: 16px;
          border-style: none;
        }

        .title {
          font-size: 33px;
          color: rgba(0, 0, 0, .85);
          font-family: "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
          font-weight: 600;
          position: relative;
          top: 2px;
        }
      }

      .desc {
        font-size: 14px;
        color: rgba(0, 0, 0, 0.45);
        margin-top: 12px;
        margin-bottom: 40px;
      }
    }

    .main {
      min-width: 260px;
      width: 368px;
      margin: 0 auto;
    }

    .footer {
      position: absolute;
      width: 100%;
      bottom: 0;
      padding: 0 16px;
      margin: 48px 0 24px;
      text-align: center;

      .links {
        margin-bottom: 8px;
        font-size: 14px;

        a {
          color: rgba(0, 0, 0, 0.45);
          transition: all 0.3s;

          &:not(:last-child) {
            margin-right: 40px;
          }
        }
      }

      .copyright {
        color: rgba(0, 0, 0, 0.45);
        font-size: 14px;
      }
    }
  }
}
</style>