Bladeren bron

解除显示

afa 7 maanden geleden
bovenliggende
commit
556c4a00c4

+ 2 - 2
application/admin/lang/zh-cn/product/lists.php

@@ -11,8 +11,8 @@ return [
     'Weigh'       => '排序',
     'Details'     => '详情',
     'Status'      => '状态',
-    'Min_transfer_fee' => '最小运费',
-    'Max_transfer_fee' => '最大运费',
+    'Min_transfer_fee' => '寄售最低价',
+    'Max_transfer_fee' => '寄售最高价',
     'Gift_fee'         => '赠送手续费(百分比)',
     'Freight'          => '提货物流费',
     'Create_time' => '创建时间',

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

@@ -121,7 +121,6 @@ class Pledge extends Api
       public function collect(PledgeLogic $pledgeLogic)
       {     
             //if(cache('collect_'.$this->auth->id)) $this->error(__("正在挖矿中,请稍后再试"));
-
             Db::startTrans();
             try {
                   // 质抵押订单
@@ -148,7 +147,7 @@ class Pledge extends Api
             Db::startTrans();
             try {
                   // 质抵押订单 
-                  $res = $pledgeLogic::setPledgeRemove($pledge_id,  1275);
+                  $res = $pledgeLogic::setPledgeRemove($pledge_id,  $this->auth->id);
                   
                   // 提交事务
                   Db::commit();

+ 3 - 2
application/common/logic/PledgeLogic.php

@@ -71,14 +71,15 @@ class PledgeLogic
             ->where('a.status', '>', $model::Close)
             ->field('a.*,b.title')
             ->select();
-        if(empty($list))  throw new Exception('暂无质押订单');
+        if(empty($list)) throw new Exception('暂无质押订单');
         $day   = 86400;
         $total = 0; //当前累计收益
         $growth= 0; //增长累计收益
         $time  = time();
-        foreach ($list as $item) {
+        foreach ($list as &$item) {
             if($item->status == $model::Remove) {
                 $total += $item->total_self;
+                unset($item);
             }else{
                 $reta  = bcdiv($item->day_num, $day, 6); //天
                 $inter = ($item->last_time == 0) ? $time - $item->create_time: $time - $item->last_time; //最后收取时间