<template>
  <div class="uc_vip_container">
    <div class="banner">
      <view class="banner_text">
        <text>{{ userinfo['level_name'] }}</text>
      </view>
    </div>

    <div class="content">
      <div class="title">
        <text>我的会员权益</text>
      </div>

      <!--      权益列表-->
      <van-row gutter="10" class="benefit-row">
        <van-col span="8">
          <view class="benefit">
            <img src="https://img.shuimuai.com/quanyi_icon_1.png" alt="" class="icon1">
            <view>
              <text class="title">会员卡</text>
            </view>
            <view>
              <text class="subtitle">{{ datas.card }}张</text>
            </view>
          </view>
        </van-col>
        <van-col span="8">
          <view class="benefit">
            <img src="https://img.shuimuai.com/quanyi_icon_2.png" alt="" class="icon2">
            <view>
              <text class="title">核销时间{{ datas.play_time }}分钟</text>
            </view>
            <view>
              <text class="subtitle">游玩限期{{ datas.validity }}个月</text>
            </view>
          </view>
        </van-col>
        <van-col span="8">
          <view class="benefit">
            <img src="https://img.shuimuai.com/quanyi_icon_3.png" alt="" class="icon3">
            <view>
              <text class="title">参与活动</text>
            </view>
            <view>
              <text class="subtitle">{{ datas.validity }}个月内</text>
            </view>
          </view>
        </van-col>
        <van-col span="8">
          <view class="benefit">
            <img src="https://img.shuimuai.com/quanyi_icon_4.png" alt="" class="icon4">
            <view>
              <text class="title">租售产品</text>
            </view>
            <view>
              <text class="subtitle">租{{ datas.lease_time }}套每天15分钟</text>
            </view>
          </view>
        </van-col>
        <van-col span="8">
          <view class="benefit">
            <img src="https://img.shuimuai.com/quanyi_icon_5.png" alt="" class="icon5">
            <view>
              <text class="title">参与课程</text>
            </view>
            <view>
              <text class="subtitle">{{ datas.lease_time }}个月</text>
            </view>
          </view>
        </van-col>
        <van-col span="8">
          <view class="benefit">
            <img src="https://img.shuimuai.com/quanyi_icon_6.png" alt="" class="icon6">
            <view>
              <text class="title">邀请有奖</text>
            </view>
            <view>
              <text class="subtitle">{{ datas.lease_time }}个月</text>
            </view>
          </view>
        </van-col>
      </van-row>


      <!--      权益描述-->
      <view class="desc" v-html="datas.content">
      </view>
    </div>
  </div>
</template>

<script>

import {vipPowerLevel} from "../../../requests/vip";
import utils from '../../../utils/index'

var $this
export default {
  name: "uc_vip_container",
  components: {},
  data() {
    return {
      datas: [],
      userinfo: {},
    }
  },
  methods: {
    //获取页面数据初始化
    getData() {
      vipPowerLevel().then((res) => {
        let $data = res.data;
        $this.datas = $data.data
      })
    }
  }
  ,
  mounted() {
    $this.getData()
    $this.userinfo = wx.getStorageSync('userinfo')
    $this.userinfo['level_name'] = utils.get_level_name($this.userinfo['level'])
  },
  created() {
    $this = this;
  },
  onLoad() {
  }
}
</script>

<style scoped>
@import "index.css";
</style>
