<template>
  <div>
    <mt-popup v-model="show" popup-transition="popup-fade">
      <img src="../../assets/gotologin.png" alt=""  class="gotologin"/>
      <div class="login_success">您还尚未绑定手机号</div>
      <div class="login_message">绑定手机号方便下次继续阅读</div>
      <div class="go_back_btn" @click="goBind">去绑定</div>
      <div class="close_icon" @click="close"><img src="../../assets/cancellogin.png" alt=""></div>
    </mt-popup>
  </div>
</template>
<script>
import { Popup } from "mint-ui";
import router from "../../router";
export default {
  name: "GoLogin",
  data() {
    return {
      popupVisible: false
    };
  },
  components: {
    mtPopup: Popup
  },
  props: {
    show: {
      required: false,
      type: Boolean,
      default: true
    },
    close: {
      required: false,
      type: Function
    },
    callback: {
      required: false,
      type: Function
    }
  },
  methods: {
    goBind() {
      router.push("/login");
      this.close();
      this.callback("success");
    }
  }
};
</script>
<style lang="scss" scoped>
/deep/.mint-popup {
  .gotologin {
    width: 202px;
    height: 144px;
  }
  padding: 1rem;
  border-radius: 0.2rem;
  position: fixed;
  background: #fff;
  top: 40%;
  left: 50%;
  -webkit-transform: translate3d(-50%, -50%, 0);
  transform: translate3d(-50%, -50%, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transition: 0.2s ease-out;
  transition: 0.2s ease-out;
  .login_success {
    margin-top: 10px;
    text-align: center;
    font-size: 18px;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
  }
  .go_back_btn {
    height: 0.7rem;
    line-height: 0.7rem;
    background: #3ba3fc;
    text-align: center;
    color: white;
    border-radius: 0.2rem;
    margin: 0 auto;
  }
  .login_message {
    font-size: 15px;
    color: #666666;
    font-weight: 400;
    text-align: center;
    margin-bottom: 10px;
  }
  .close_icon {
    position: absolute;
    left: 45%;
    bottom: -1rem;
    color: white;
    margin-top: 0.2rem;
  }
}
</style>
