<template>
  <div class="list flex" v-loading.body.fullscreen="fullscreenLoading" element-loading-background="rgba(255, 255, 255, 0)">
    <div class="item flex" @click="goDepositUrl('/deposit')">
      <img class="icon" src="/img/home/icon4.png" alt="">
      <div>
        <!-- 存款 -->
        {{ $t('home.l13') }}
      </div>
    </div>
    <div class="item flex" @click="goUrl('/withdraw')">
      <img class="icon" src="/img/home/icon5.png" alt="">
      <div>
        <!-- 取款 -->
        {{ $t('home.l14') }}
      </div>
    </div>
    <div class="item flex" @click="goUrl('/convert')">
      <img class="icon" src="/img/home/icon6.png" alt="">
      <div>
        <!-- 划转 -->
        {{ $t('home.l15') }}
      </div>
    </div>
    <div class="item flex" @click="$router.push('/chat')">
      <img class="icon" src="/img/home/icon7.png" alt="">
      <div>
        <!-- 客服 -->
        {{ $t('home.l16') }}
      </div>
    </div>
    <div class="item flex" @click="$router.push('/download')">
      <img class="icon" src="/img/home/icon8.png" alt="">
      <div>
        <!-- APP下载 -->
        {{ $t('home.l17') }}
      </div>
    </div>
    <!-- <authIdentity v-if="authShow" @cancel="authShow = false" /> -->
    <van-popup v-model="depositPopShow" position="right" :style="{ width: '100%' }">
      <depositPop :url="depositUrl" @cancel="depositPopShow = false" />
    </van-popup>
  </div>
</template>
<script>
// import authIdentity from "@/components/authIdentity";
import selectDepositPop from "@/mixins/selectDepositPop";
export default {
  components: {
    // authIdentity
  },
  mixins: [selectDepositPop],
  data () {
    return {
      authShow: false,
    }
  },
  deactivated () {
    this.authShow = false
  },
  activated() {
    this.authShow = false
  },
  methods: {
    goUrl(url) {
      if (!this.isLogin) {
        this.$router.push('/login')
        return
      }
      if (this.userInfo.identity_status == 1) {
        this.$router.push(url)
        return
      }
      this.fullscreenLoading = true
      this.$store.dispatch('getUserInfo').then(() => {
        // if (this.userInfo.identity_status !== 1) {
        //   this.authShow = true
        // } else {
          this.$router.push(url)
        // }
      }).catch(() => {}).finally(() => {
        this.fullscreenLoading = false;
      })
    }
  }
}
</script>
<style lang="less" scoped>
.list {
  padding: 0 12px;
  align-items: flex-start;
  justify-content: space-between;
  border-radius: 4px;
  border: 1px solid #F1F1F1;
  margin-bottom: 12px;
  .item {
    padding-top: 14px;
    padding-bottom: 14px;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    font-size: 12px;
    .icon {
      width: 46px;
      margin-bottom: 8px;
    }
  }
}
</style>