浏览代码

质押存储

afa 5 月之前
父节点
当前提交
f1b2778fbb
共有 2 个文件被更改,包括 1 次插入3 次删除
  1. 0 2
      application/api/controller/Pledge.php
  2. 1 1
      application/api/logic/PledgeLogic.php

+ 0 - 2
application/api/controller/Pledge.php

@@ -100,8 +100,6 @@ class Pledge extends Api
         }
         }
         Db::startTrans();
         Db::startTrans();
         try {
         try {
-          
-           
             // 质抵押订单 
             // 质抵押订单 
             $res = $pledgeLogic::setPledgeOrder($pledge, $order_id, $this->auth->id, $count, $this->pay[$pay_type], $pledge[$this->pay[$pay_type]]);
             $res = $pledgeLogic::setPledgeOrder($pledge, $order_id, $this->auth->id, $count, $this->pay[$pay_type], $pledge[$this->pay[$pay_type]]);
 
 

+ 1 - 1
application/api/logic/PledgeLogic.php

@@ -218,7 +218,7 @@ class PledgeLogic
     public static function isUserBalance(object $user, int $pay_type, string $pay)
     public static function isUserBalance(object $user, int $pay_type, string $pay)
     {
     {
         $result = true;
         $result = true;
-        if ($pay_type == 1 && bcadd($user['token'], $user['frozen']) < $pay) $result = false;
+        if ($pay_type == 1 && bcadd($user['token'], $user['frozen'], 6) < $pay) $result = false;
         if ($pay_type == 2 && $user['teac'] < $pay) $result = false;
         if ($pay_type == 2 && $user['teac'] < $pay) $result = false;
         return $result;
         return $result;
     }
     }