<!--pages/payOrder.wxml-->
<block wx:if="{{noticeText}}" class="noticeBar">
  <VanNoticeBar color="#ffffff" background="#4ac987" left-icon="volume-o" mode="link" text="{{noticeText}}" bindtap="goToProductDetail" />
</block>
<view class="content">
  <view class="backGround">
    <image src="{{imgUrl}}" mode="" />
  </view>

  <view class="orderList">
    <view class="firstPayInfo" wx:if="{{firstData}}">
      <view class="saleInfo">
        售价：
        <text class="salePrice">{{firstData.salePrice / 100 }}</text>
        <text class="price">{{firstData.price / 100}}</text>
        元
      </view>
      <view class="validInfo">
        有效期：自购买日起
        <text class="day">{{firstData.days}}</text>
        天
      </view>
      <view class="firstCharge">首充优惠</view>
    </view>

    <view class="payInfo" wx:else>
      <view class="continue">
        <text>延续会员</text>
        <text class="grey">有效期：自购买日起/天</text>
      </view>
      <view class="infoBox">
        <view wx:for="{{orderList}}" class="{{currentIndex == index ? 'item active' : 'item'}}" wx:key="index" bindtap="selectItem" data-index="{{index}}" data-id="{{item.id}}">
          <view class="remainDays">{{item.days}}<text class="days">天</text></view>
          <view class="salePrice">特价<text class="lightHigh">{{item.salePrice / 100}}</text>元</view>
          <view class="price">原价{{item.price / 100}}元</view>
        </view>
      </view>
    </view>

    <button class="btn" type="primary" bindtap="createPayOrder">立即购买</button>
  </view>
</view>

<userNumberChkeck show="{{isShowNumberCheck}}" bind:getUserPhoneSuccess="checkUserInfo"></userNumberChkeck>