|
|
@@ -47,7 +47,7 @@ class Offline extends Api
|
|
|
$amount = $this->request->post('amount'); // 金额
|
|
|
$sign = $this->request->post('sign'); // 签名信
|
|
|
$address = $this->request->post('to_address'); // 地址
|
|
|
- if(empty($sign)){
|
|
|
+ if(empty($sign) || empty($address)){
|
|
|
$this->error('参数错误');
|
|
|
}
|
|
|
$real = bcdiv($amount, getConfig('convert_rate'), 6); // 折合转换 U = 1
|
|
|
@@ -58,12 +58,11 @@ class Offline extends Api
|
|
|
} else if ($amount < $min) {
|
|
|
$this->error('提现金额不能小于' . $min);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 扣除手续费后
|
|
|
if ($rate > 0 && $rate < 1) { // 比例范围只在0-1之间
|
|
|
- $real = bcmul($amount, bcsub(1, $rate, 6), 6);
|
|
|
+ $real = bcmul($real, bcsub(1, $rate, 6), 6);
|
|
|
}
|
|
|
-
|
|
|
$uid = $this->auth->getTokenUserID();
|
|
|
|
|
|
// 用户信息
|