<!--pages/memberCenter/menberCenter2.wxml-->
<van-notify id="van-notify"></van-notify>
<myPay id="myPay" bindsuccess="successPay"></myPay>
<view class="memberCenter">
  <!-- <view class="headTitle">会员中心</view> -->
  <view class="content">
    <!-- 个人信息 -->
    <view class="userinfo">
      <view class="left">
        <wux-avatar size="large" wx:if="{{userinfo.fileGuid}}" src="{{imgHttp}}{{userinfo.fileGuid}}"></wux-avatar>
        <wux-avatar size="large" wx:else src="/static/image/unlogin.jpeg"></wux-avatar>
        <view class="message">
          <view class="name">{{userinfo.name || userinfo.phoneNum}} 
          <span wx:if="{{userinfo.vip.name}}" class="vipicon">vip</span>
          </view>
        </view>
      </view>
    </view>
    <!-- 开通会员类型 -->
    <scroll-view  scroll-x="true">
      <view class="vipType">
        <view  wx:for="{{vipType}}" wx:key="index" class="vipType_item {{chooseVip.name == item.name?'checked':''}}" data-item="{{item}}" bind:tap="chooseVip">
          <view class="vipType_item_title">{{item.name}}</view>
          <view class="vipType_item_price"><span wx:if="{{item.finalPrice || item.finalPrice == 0}}" style="font-size: 12px;">￥</span>{{item.finalPrice}}</view>
          <view class="vipType_item_currentPrice" wx:if="{{(item.price || item.price == 0) && item.finalPrice < item.price}}"><span wx:if="{{item.price || item.price == 0}}">￥</span>{{item.price}}</view>
        </view>
      </view>
    </scroll-view>
    <!-- 会员权益 -->
    <view class="vipDescription">
      <!-- <view>{{chooseVip.description}}</view> -->
      <view class="vipDescription_title">首次开通赠送以下福利：</view>
      <view class="vipDescription_content">
        <view class="vipDescription_content_item">
          <view class="vipDescription_content_item_img">
            <image class="vipDescription_content_item_img" src="../../static/image/时长.png" mode="aspectFit"/>
          </view>
          <view class="vipDescription_content_item_text">
            <view>赠送额外会员时长</view>
            <!-- <view style="font-size: 20rpx;margin-top: 4px;">100元无门槛</view> -->
          </view>
        </view>
        <view class="vipDescription_content_item">
          <view class="vipDescription_content_item_img">
            <image class="vipDescription_content_item_img" src="../../static/image/服务.png" mode="aspectFit"/>
          </view>
          <view class="vipDescription_content_item_text">深度功能解锁</view>
        </view>
      </view>
    </view>
    <!-- 开通会员按钮 -->
    <view class="payBtn {{!chooseVip?'noPay':''}}" bind:tap="openVip">
      <view wx:if="{{chooseVip.finalPrice || chooseVip.finalPrice == 0}}" class="payBtn_price">￥{{chooseVip.finalPrice}}</view>
      <view>确认开通</view>
    </view>
    <!-- 会员权益 -->
    <view class="equityDetails">
      <view class="equityDetails_title">会员权益对比</view>
      <view class="equityDetails_content">
        <mytable thead="{{tableHead}}" data="{{tableData}}" tdStyle=" width:calc(100vw / 3);text-align:left ;white-space: normal;overflow-wrap: break-word;"></mytable>
      </view>
    </view>
  </view>
</view>