|
|
@@ -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();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 提现自动打款回调
|