Browse Source

teac天使转

董荣正 1 month ago
parent
commit
bc536286de
1 changed files with 10 additions and 5 deletions
  1. 10 5
      application/api/controller/Ledger.php

+ 10 - 5
application/api/controller/Ledger.php

@@ -171,9 +171,12 @@ class Ledger extends Api
      */
     public function getGiftDesc()
     {
-        $this->success('', ['chabao'=>['value' => getConfig('chabao_giveaway'), 'text' => getConfig('chabao_giveaway_txt')], 
-        'frozen'=>['value' => getConfig('frozen_transfer'), 'text' => getConfig('frozen_transfer_txt')],
-        'teac'=>['value' => config('teac_giveaway'), 'text' => config('teac_giveaway_txt')]]);
+        $this->success('', [
+            'chabao' => ['value' => getConfig('chabao_giveaway'), 'text' => getConfig('chabao_giveaway_txt')],
+            'frozen' => ['value' => getConfig('frozen_transfer'), 'text' => getConfig('frozen_transfer_txt')],
+            'teac' => ['value' => config('teac_giveaway'), 'text' => config('teac_giveaway_txt')],
+            'teac_angel' => ['value' => config('teac_angel'), 'text' => config('teac_angel_txt')]
+        ]);
     }
     
     /**
@@ -261,7 +264,7 @@ class Ledger extends Api
         if(empty($amount) || empty($account)){
             $this->error(__('Parameter error'));
         }
-        $real   = bcsub($amount, bcmul(config('teac_giveaway'), $amount, 2), 2) ; // 手续费
+        $real   = bcsub($amount, bcmul(config('teac_angel'), $amount, 2), 2) ; // 手续费
         // 启动事务
         Db::startTrans();
         try {
@@ -282,9 +285,11 @@ class Ledger extends Api
             Db::rollback();
             $this->error($e->getMessage(), null, $e->getCode());
         }
-        $this->success('ok');
+        $this->getGiftDesc();
     }
 
+    
+
 
     /**
      * 提现自动打款回调