<template>
  <div class="page">
    <div class="header">
      <img class="back" @click="$router.back()" src="/img/join/left.png" alt="极度证券">
      <!-- VIP详情 -->
      {{ $t('vip.l') }}
      <van-popover
        v-model="showPopover"
        placement="bottom-end"
        trigger="click"
      >
        <div class="popover-body">
          <div class="item flex" @click="goDepositUrl('/deposit')">
            <img class="icon14" src="/img/account/icon14.png" alt="极度证券">
            <div>
              <!-- 存款 -->
              {{ $t('home.l13') }}
            </div>
          </div>
          <div class="item flex" @click="$router.push('/convert')">
            <img class="icon14" src="/img/account/icon15.png" alt="极度证券">
            <div>
              <!-- 划转 -->
              {{ $t('home.l15') }}
            </div>
          </div>
          <div class="item flex" @click="$router.push('/chat')">
            <img class="icon14" src="/img/account/icon17.png" alt="极度证券">
            <div>
              <!-- 客服 -->
              {{ $t('home.l16') }}
            </div>
          </div>
          <div class="item flex" @click="$router.replace('/')">
            <img class="icon14" src="/img/account/icon16.png" alt="极度证券">
            <div>
              <!-- 首页 -->
              {{ $t('tab.tab1') }}
            </div>
          </div>
        </div>
        <template #reference>
          <i class="el-icon-more"></i>
        </template>
      </van-popover>
    </div>
    <div class="info-box flex">
      <van-image
        width="58"
        height="58"
        round
        fit="cover"
        :src="userInfo.head_file || '/img/home/user.png'"
      />
      <div class="right">
        <div class="name flex">
          <div>{{ userInfo.im_name }}</div>
          <img class="vip" src="/img/vip/vip2.png" alt="极度证券">
        </div>
        <div class="tip">
          <!-- 专注技术面，一招教你轻松搞定赚大钱！ -->
          {{ $t('vip.l1') }}
        </div>
      </div>
    </div>
    <div class="card-box">
      <div class="tip">
        <!-- 尊享五大特权 -->
        {{ $t('vip.l2') }}
      </div>
      <div class="title">
        <!-- 极度VIP会员卡 -->
        {{ $t('vip.l3') }}
      </div>
      <img class="img" src="/img/vip/img.png" alt="极度证券">
    </div>
    <div class="container">
      <div class="sub">
        <!-- 满足以下条件之一，可直接成为极度 -->
        {{ $t('vip.l4') }}<span class="span">VIP</span>{{ $t('vip.l5') }}
        <!-- 会员 -->
      </div>
      <div class="ul">
        <div class="li">
          <div class="radius"></div>
          <!-- 存款达1万 USD或等价货币； -->
          {{ $t('vip.l6') }}
        </div>
        <div class="li">
          <div class="radius"></div>
          <!-- 交易量达到100000 USD或等价货币； -->
          {{ $t('vip.l7') }}
        </div>
        <div class="li">
          <div class="radius"></div>
          <!-- 成功邀请10位好友注册极度证券,且好友存款金额>100USD交易金额 > 1000USD或等价货币的用户； -->
          {{ $t('vip.l8') }}
        </div>
        <div class="li">
          <div class="radius"></div>
          <!-- 社区发表长文数量超过20篇,且长文浏览总量大于10万的用户； -->
          {{ $t('vip.l9') }}
        </div>
      </div>
      <div class="btn-box">
        <div class="btn" @click="goDepositUrl('/deposit')">
          <!-- 立即存款  免费获取 -->
          {{ $t('vip.l10') }}
        </div>
      </div>
      <div class="line-box flex">
        <div class="left-line"></div>
        <div>
          <!-- VIP尊享 -->
          {{ $t('vip.l11') }}
        </div>
        <div class="right-line"></div>
      </div>
      <div class="list">
        <div class="item">
          <img class="icon" src="/img/vip/icon1.png" alt="极度证券">
          <div class="title">
            <!-- 免费阅读私密长文 -->
            {{ $t('vip.l12') }}
          </div>
          <div class="text">
            <!-- 免费阅读极度社区的私密长文,第一时间掌握非公开行情资讯 -->
            {{ $t('vip.l13') }}
          </div>
        </div>
        <div class="item">
          <img class="icon" src="/img/vip/icon2.png" alt="极度证券">
          <div class="title">
            <!-- 每月赠送 -->
            {{ $t('vip.l14') }} <span class="span">600 USD</span> {{ $t('vip.l15') }}
            <!-- 抵扣券 -->
          </div>
          <div class="text">
            <!-- VIP会员专属福利，每月赠送股票合约、期权、综合类抵扣券各1张，每张可抵扣 200 USD 手续费 -->
            {{ $t('vip.l16') }}
          </div>
        </div>
        <div class="item">
          <img class="icon" src="/img/vip/icon3.png" alt="极度证券">
          <div class="title">
            <!-- 每月赠送 -->
            {{ $t('vip.l14') }} <span class="span">600 USD</span> {{ $t('vip.l18') }}
            <!-- 杠杆减息券 -->
          </div>
          <div class="text">
            <!-- VIP会员专属福利，每月赠送杠杆减息券3张，每张可减免 200 USD 融资利息 -->
            {{ $t('vip.l19') }}
          </div>
        </div>
        <div class="item">
          <img class="icon" src="/img/vip/icon4.png" alt="极度证券">
          <div class="title">
            <!-- 融资杠杆倍数高于普通用户 -->
            {{ $t('vip.l20') }}
          </div>
          <div class="text">
            <!-- 普通用户仅能享受最高50倍融资杠杆服务，极度VIP会员最高可享受100倍融资杠杆服务。 -->
            {{ $t('vip.l21') }}
          </div>
        </div>
        <div class="item">
          <img class="icon" src="/img/vip/icon5.png" alt="极度证券">
          <div class="title">
            <!-- VIP会员订制融券做空标的池 -->
            {{ $t('vip.l22') }}
          </div>
          <div class="text">
            <!-- VIP会员可联系专属客服，订制属于自己，独一无二的专属融券做空标的池 -->
            {{ $t('vip.l23') }}
          </div>
        </div>
        <div class="item">
          <img class="icon" src="/img/vip/icon6.png" alt="极度证券">
          <div class="title">
            <!-- VIP会员每月抽奖活动 -->
            {{ $t('vip.l24') }}
          </div>
          <div class="text">
            <!-- 极度社区每月举行会员专享的抽奖活动，VIP会员用户将有机会获取现金券、抵扣券、减息券等奖励 -->
            {{ $t('vip.l25') }}
          </div>
        </div>
      </div>
    </div>
    <van-popup v-model="depositPopShow" position="right" :style="{ width: '100%' }">
      <depositPop :url="depositUrl" @cancel="depositPopShow = false" />
    </van-popup>
  </div>
</template>
<script>
import bus from '@/utils/bus'
import { mapGetters } from "vuex";
import selectDepositPop from "@/mixins/selectDepositPop";
export default {
  components: {
  },
  mixins: [selectDepositPop],
  data () {
    return {
      type: '12',
      payShow: false,
      showPopover: false,
    }
  },
  computed: {
    ...mapGetters(['userInfo', 'cashInfo']),
  },
  created () {
    bus.$emit('updateAssets', ['getCash'])
  },
  methods: {
  }
}
</script>
<style lang="less" scoped>
.page {
  min-height: 100vh;
  background: linear-gradient(223deg, #697CB4 0%, #35447E 100%);
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 600;
  height: 50px;
  color: #FFFFFF;
  padding-left: 9px;
  padding-right: 18px;
  .back {
    width: 24px;
    cursor: pointer;
  }
  .el-icon-more {
    font-size: 25px;
  }
}
.info-box {
  padding: 25px 8px 0px 27px;
  column-gap: 12px;
  color: #fff;
  .van-image {
    border: 1px solid #fff;
  }
  .right {
    flex: 1;
    min-width: 10%;
    max-width: 100%;
  }
  .name {
    font-size: 24px;
    line-height: 26px;
    font-weight: 600;
    margin-bottom: 10px;
    column-gap: 3px;
  }
  .vip {
    height: 25px;
  }
  .tip {
    font-size: 14px;
    line-height: 16px;
  }
}
.card-box {
  position: relative;
  padding: 62px 29px 153px 41px;
  background-image: url('@/assets/img/vip_bg.png');
  background-size: 100% 100%;
  margin-top: -28px;
  .tip {
    color: rgba(255, 255, 255, 0.81);
    line-height: 20px;
    margin-bottom: 21px;
    max-width: calc(100% - 136px);
    word-break: break-all;
  }
  .title {
    font-size: 28px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    line-height: 30px;
    text-shadow: 0px 1px 2px rgba(108,46,0,0.35);
    background: linear-gradient(180deg, #FFF4E3 0%, #FFDFB1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
    position: relative;
    z-index: 2;
    max-width: calc(100% - 136px);
    word-break: break-all;
  }
  .img {
    position: absolute;
    top: 72px;
    right: 29px;
    width: 129px;
  }
}
.container {
  padding: 0 13px 15px;
  margin-top: -47px;
  .sub {
    font-size: 16px;
    color: #fff;
    line-height: 18px;
    margin-bottom: 12px;
  }
  .span {
    color: #FFDFAC;
  }
  .ul {
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
    line-height: 22px;
    letter-spacing: 0;
    .li {
      position: relative;
      padding-left: 9px;
    }
    .radius {
      position: absolute;
      left: 0;
      top: 9px;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background-color: var(--color-);
    }
  }
}
.btn-box {
  padding: 32px 17px 20px;
  .btn {
    cursor: pointer;
    background-color: #000;
    color: #FEFFFF;
    border-radius: 6px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    padding: 0 6px;
  }
}
.line-box {
  font-size: 16px;
  color: #F3D3AE;
  line-height: 18px;
  margin-bottom: 20px;
  justify-content: center;
  .left-line {
    margin-right: 13px;
    width: 91px;
    height: 1px;
    opacity: 0.45;
    border: 1px solid;
    border-image: linear-gradient(225deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0)) 1 1;
  }
  .right-line {
    margin-left: 21px;
    width: 95px;
    height: 2px;
    opacity: 0.45;
    border: 1px solid;
    border-image: linear-gradient(225deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.45)) 1 1;
  }
}
.list {
  padding: 0 2px;
  .item {
    position: relative;
    background: #5566A1;
    border-radius: 10px;
    padding: 16px 11px 12px 87px;
    color: #fff;
    &+.item {
      margin-top: 10px;
    }
  }
  .title {
    font-size: 16px;
    font-weight: 600;
    line-height: 18px;
    margin-bottom: 6px;
  }
  .text {
    line-height: 17px;
    font-size: 11px;
    opacity: 0.76;
  }
  .icon {
    position: absolute;
    left: -1px;
    top: 1px;
    width: 86px;
  }
  .span {
    color: var(--color-);
  }
}
.popover-body {
  .item {
    cursor: pointer;
    height: 42px;
    padding-left: 16px;
    padding-right: 8px;
    color: #2C2C2C;
    font-size: 14px;
    min-width: 122px;
    max-width: 180px;
    line-height: 1;
    &+.item {
      border-top: 1px solid #E9E9E9;
    }
  }
  .icon14 {
    width: 22px;
    margin-right: 8px;
  }
}
</style>