<!--subPackage/page/pages/valueCardInfo/valueCardInfo.wxml-->
<image src='{{valueCardInfo.infoUrl ? valueCardInfo.infoUrl : valueCardInfo.listUrl}}' class='card-info' mode='widthFix'></image>
<view class='card-info-body'>
  <view class='card-title'>{{valueCardInfo.activityName}}</view>
  <view class='card-desc-item' wx:if="{{valueCardInfo.hasDate}}">
    <view class='lf'>活动时间</view>
    <view class='rg'>{{valueCardInfo.startTime}} 至 {{valueCardInfo.endTime}}</view>
  </view>
  <view class='card-desc-item' wx:if="{{buyType == 1}}">
    <view class='lf'>现金支付</view>
    <view class='rg'>￥{{valueCardInfo.acPayMoney}}</view>
  </view>
  <view class='card-desc-item' wx:if="{{buyType == 2}}">
    <view class='lf'>积分兑换</view>
    <view class='rg'>{{valueCardInfo.integrationAmount}}积分</view>
  </view>
  <view class='card-desc-item'
    wx:for="{{valueCardInfo.descArr}}"
    wx:for-item="item"
    wx:for-index="idx"
    wx:key="*this">
    <view class='lf'>{{item.label ? item.label : '说明内容'}}</view>
    <view class='rg'>
      <view class='list-item'> {{item.value}}</view>
    </view>
  </view>
</view>


<!-- 底部 -->
<view class='bottom-buy'>
    <view class='lf-info'>
      <!-- 选中 active -->
      <view class='check-box {{checked ? "active" : ""}}' bindtap='onTapSwitchChecked'>
        <image src='/assets/imgs/tick-success.png' mode='aspectFit'></image>
      </view>
      <view class='explain'>
        <label> 阅读并同意 </label>
        <text bindtap='onTapViewRule'>《超值卡规则》</text>
      </view>
    </view>
    
    <view class='rg-button positionRe {{checked ? "" : "disabled"}}' wx:if="{{!userHasBaseInfo}}">
      <button class="positionAbs clear-btn"
      bindgetuserinfo="_getUserInfo" open-type='getUserInfo'></button>
      {{buyType == 1 ? "立即购买" : "立即兑换"}}
    </view>
    <view class='rg-button {{checked ? "" : "disabled"}}' 
    wx:if="{{userHasBaseInfo}}" bindtap='onTapBuy'>{{buyType == 1 ? "立即购买" : "立即兑换"}}</view>
</view>

<!-- 超值卡规则 -->
<view class='rule-modal' wx:if="{{showModal}}">
  <view class='modal-body'>
    <view class='modal-body-title'>
      《超值卡规则》
      <image class='modal-body-close' src='/assets/imgs/gray_close.png' mode='aspectFit' bindtap='onTapCloseModal'></image>
    </view>

    <view class='modal-body-con'>
      <image src="{{valueCardInfo.ruleUrl}}" mode="widthFix"></image>
    </view>

    <view class='modal-body-bottom'>
      <label bindtap='onTapModalAgree'>阅读并同意</label>
    </view>
  </view>
</view>