|
|
@@ -21,7 +21,6 @@ use think\Hook;
|
|
|
use think\Log;
|
|
|
use think\Model;
|
|
|
use think\Validate;
|
|
|
-use function fast\e;
|
|
|
|
|
|
/**
|
|
|
* 会员接口
|
|
|
@@ -33,8 +32,8 @@ class Offline extends Api
|
|
|
{
|
|
|
$resp = [
|
|
|
'usdt' => '0', // 系统余额(U)
|
|
|
- 'withdraw_min_amount' => (new ParametersModel)->getValue('withdrawMinAmount') ?? '0', // 最低提现U数量
|
|
|
- 'withdraw_fee_rate' => (new ParametersModel)->getValue('withdrawFeeRate') ?? '0', // 手续费比例
|
|
|
+ 'withdraw_min_amount' => Env::get('rental.withdraw_min_amount'), // 最低提现U数量
|
|
|
+ 'withdraw_fee_rate' => Env::get('rental.withdraw_fee_rate') // 手续费比例
|
|
|
];
|
|
|
$wallet = (new LedgerWalletModel)->getWallet($this->auth->getTokenUserID());
|
|
|
if (!empty($wallet)) {
|
|
|
@@ -51,14 +50,13 @@ class Offline extends Api
|
|
|
{
|
|
|
$amount = $this->request->post('amount'); // 金额
|
|
|
$sign = $this->request->post('sign'); // 签名信
|
|
|
-// $sign = 'test';
|
|
|
if(empty($sign)){
|
|
|
$this->error('参数错误');
|
|
|
}
|
|
|
|
|
|
$real = $amount; // 实际到账
|
|
|
- $min = (new ParametersModel)->getValue('withdrawMinAmount') ?? '0';
|
|
|
- $rate = (new ParametersModel)->getValue('withdrawFeeRate') ?? '0';
|
|
|
+ $min = Env::get('rental.withdraw_min_amount');
|
|
|
+ $rate = Env::get('rental.withdraw_fee_rate');
|
|
|
if ($amount <= 0) {
|
|
|
$this->error('提现金额必须大于0');
|
|
|
} else if ($amount < $min) {
|
|
|
@@ -110,13 +108,14 @@ class Offline extends Api
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 充值地址
|
|
|
+ * 提现地址
|
|
|
* @return void
|
|
|
*/
|
|
|
public function withdrawList()
|
|
|
{
|
|
|
-
|
|
|
- $this->success('', getConfig('recharge_address'));
|
|
|
+ $where = ['user_id' => $this->auth->getTokenUserID()];
|
|
|
+ $paginator = (new OfflineWithdrawRecordModel)->where($where)->order('id DESC')->paginate($this->pageSize);
|
|
|
+ $this->success('', $this->buildResp($paginator->total(), $paginator->currentPage(), $paginator->items()));
|
|
|
}
|
|
|
|
|
|
|