<template>
  <div>
    <div class="rigth-aside">
      <ul class="right-aside-btns">
        <li @click="showApplyForm">
          <img src="https://zws-imgs-pub.ezijing.com/static/public/d434fa0ffd77892273e63e6d694cff0a.png" />
          <p>我要报名</p>
        </li>
        <li @click="showFollow">
          <img src="https://zws-imgs-pub.ezijing.com/static/public/5526b83d7526b2742f6eba7151c367db.png" />
          <p>关注我们</p>
        </li>
      </ul>
    </div>
    <!-- 我要报名 -->
    <van-overlay :show="applyFormVisible" @click="hideApplyForm">
      <div class="dialog-box" @click.stop>
        <apply-form @success="hideApplyForm"></apply-form>
      </div>
    </van-overlay>
    <!-- 关注我们 -->
    <van-overlay :show="followVisible" @click="followVisible = false">
      <div class="dialog-box" @click.stop>
        <h2 class="title">关注我们</h2>
        <div class="follow">
          <img src="https://zws-imgs-pub.ezijing.com/static/public/d2d9945d598e81c3b58aff5ce927a78a.jpg" />
          <p>扫码关注 了解更多</p>
        </div>
      </div>
    </van-overlay>
  </div>
</template>
<script>
import ApplyForm from '@/components/ApplyForm'
// import { sendCode, checkCode, postNes } from '../plugins/api'
const MOBILE_REG = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/
export default {
  components: { ApplyForm },
  data() {
    return {
      applyFormVisible: false,
      followVisible: false
    }
  },
  methods: {
    // 我要报名
    showApplyForm() {
      this.applyFormVisible = true
    },
    hideApplyForm() {
      this.applyFormVisible = false
    },
    // 关注我们
    showFollow() {
      this.followVisible = true
    }
  }
}
</script>
<style lang="scss" scoped>
::v-deep .van-overlay {
  z-index: 100;
}
.rigth-aside {
  position: fixed;
  top: 50%;
  right: 16px;
  z-index: 99;
  transform: translateY(-50%);
  .right-aside-btns {
    box-shadow: 0 2px 4px 0 rgb(0 0 0 / 10%);
    li {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 0.5rem;
      height: 0.5rem;
      font-size: 0.1rem;
      color: #999;
      background-color: #fff;
      cursor: pointer;
      img {
        width: 0.23rem;
        height: 0.23rem;
      }
    }
    li + li {
      border-top: 1px solid #999;
    }
  }
}
.dialog-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto;
  width: 345px;
  height: 426px;
  background: url('~/assets/images/dialog_bg.png') no-repeat;
  background-size: cover;
  .title {
    padding: 30px 0;
    font-size: 20px;
    color: #fff;
    text-align: center;
  }
}
.follow {
  img {
    width: 182px;
    height: 182px;
  }
  p {
    margin-top: 20px;
    font-size: 12px;
    color: #fff;
    text-align: center;
  }
}
</style>
