import depositPop from '@/components/depositPop'
export default {
  components: {
    depositPop
  },
  data () {
    return {
      depositPopShow: false,
      depositUrl: ''
    }
  },
  beforeDestroy () {
    this.depositPopShow = false
  },
  created () {
    this.depositPopShow = false
  },
  deactivated () {
    this.depositPopShow = false
  },
  activated () {
    this.depositPopShow = false
  },
  methods: {
    goDepositUrl(url) {
      if (!this.isLogin) {
        this.$router.push('/login')
        return
      }
      this.showPopover = false
      if (this.userInfo.identity_status == 1) {
        this.depositPopShow = true
        this.depositUrl = url
        return
      }
      this.fullscreenLoading = true
      this.$store.dispatch('getUserInfo').then(() => {
        // if (this.userInfo.identity_status !== 1) {
        //   this.authShow = true
        // } else {
          this.depositPopShow = true
          this.depositUrl = url
        // }
      }).catch(() => {}).finally(() => {
        this.fullscreenLoading = false
      })
    }
  }
}