<wxs module="m1">
  module.exports.toFixed = function(number){
    return number.toFixed(2);
  };
</wxs>

<view class="love-integral">
  <view>可转换：{{loveData.love}}</view>
  <view class="content">
    <view>请输入要转化的{{loveName}}</view>
    <view class="exchange">
      <icon class="iconfont icon-fontclass-jifen"></icon>
      <input type="number" class="input" value="{{love_nums}}" bindinput="_bindinput"></input>
      <view class="all" bindtap="allLove">全部兑换</view>
    </view>
    <view class="tips">
      <text>可转化{{m1.toFixed((loveData.ratio * love_nums || 0))}}{{integral}}</text>
      <text wx:if="{{loveData.least>0}}">,最低保留{{loveData.least}}{{loveName}}</text>
      <text wx:if="{{loveData.value>0}}">,1{{loveName}}={{loveData.value}}元</text>
    </view>
    <view class="confirm" bindtap="setdata">确认转化</view>
  </view>
</view>