zhashaonan 6 年之前
父节点
当前提交
5df81f2f58
共有 2 个文件被更改,包括 4 次插入5 次删除
  1. 3 4
      pages/handOutBonus/handOutBonus.js
  2. 1 1
      pages/handOutBonus/handOutBonus.wxml

+ 3 - 4
pages/handOutBonus/handOutBonus.js

@@ -55,7 +55,7 @@ Page({
     }
     getReq(params, res => {
       if (res.code == 200) {
-        let { datas } = res
+        let { datas } = res  
         let tempBless = datas['send_bless']
         this.setData({
           datas,
@@ -114,7 +114,7 @@ Page({
       if (currentValue[0] == 0 && currentValue[1] != '.') {
         currentValue = currentValue.substring(1) || 0
       }
-      if (currentValue > this.data.datas['usable']) {
+      if (currentValue > this.data.datas['share_bonus_rate'][0]['total']) {
         currentValue = value.substring(0, value.length - 1)
         wx.showToast({
           icon: 'none',
@@ -174,7 +174,7 @@ Page({
     return flag
   },
   checkTotal(money) {
-    let flag =  money < this.data.datas['usable']
+    let flag = money < this.data.datas['share_bonus_rate'][0]['total']
     if (!flag) {
       wx.showToast({
         icon: 'none',
@@ -193,7 +193,6 @@ Page({
   },
   checkBonus() {
     let flag = this.checkBindTotal(this.data.count || 0, this.data.money || 0)
-    console.log(flag);
     if (!flag){
       return
     }

+ 1 - 1
pages/handOutBonus/handOutBonus.wxml

@@ -1,7 +1,7 @@
 <!--pages/handOutBonus/handOutBonus.wxml-->
 <view class="common_box">
   <auth wx:if="{{!userInfo}}" bind:getAuth="getAuth"></auth>
-  <view class="balance_header">可分享余额:¥ {{datas['usable']}}</view>
+  <view class="balance_header">可分享余额:¥ {{datas['share_bonus_rate'][0]['total']}}</view>
   <view class="balance_cell mt20">
     <view>红包个数</view>
     <view class="right_cell">