<!--pages/spellDetail/index.wxml-->
<navbar home back text="积分换礼" background='#FFF' ></navbar>
<view style="height:{{navigationBarHeight}} "></view>
<view class='container'  >
   <!-- 拼团产品详情 -->
  <view class='detail'>
    <view class='detail-top'>
      <view class='detail-top01'>
        <image src='{{data.coverImg}}' mode="aspectFill"></image>
      </view>
      <view class='detail-top02'>
        <view class='title'>{{data.title}}</view>
        <view class='des'>{{data.subTitle}}</view>
        <view class='des'>{{'价值:'+data.priceStr+'元'}}</view>
      </view>
      <view class='detail-top03'>
        <view class='detail-p-price'>{{data.creditPrice}}积分</view>
        <view class='detail-p-name'>积分售价</view>
      </view>
    </view>
  </view>

  <!-- 拼团订单信息 -->
  <view class='order'>
    <view class='order-list'>
      <view class='order-title'>当前积分总额</view>
      <view class='order-text'>{{userInfo.credit}}</view>
    </view>
    <view class='order-list'>
      <view class='order-title'>兑换使用积分</view>
      <view class='order-text'>{{data.creditPrice}}</view>
    </view>
    <view class='order-list'>
      <view class='order-title'>剩余积分</view>
      <view class='order-text'>{{remainingPoints}}</view>
    </view>
  </view>
  <view class='edit'>
    <button class='user-motto user-enough' wx:if="{{remainingPoints>=0}}" bindtap="{{'submitAble'?'gotoPay':''}}">{{'确认'+data.creditPrice+'积分支付'}}</button>
    <button class='user-motto user-enough' style='' wx:if="{{remainingPoints<0}}" bindtap='cannotPay'>积分不足</button>
  </view>
</view>
