@ -28,7 +28,7 @@ class Dealer extends Controller
{
// 当前用户信息
/* @var UserModel $user */
private UserModel $user;
public $user;
// 当前分销商信息
private ?DealerUserModel $dealer;
@ -57,7 +57,7 @@ class Withdraw extends Controller
// 提交提现申请
$model = new WithdrawModel;
$data = $this->request->post();
if ($model->submit($dealer, $data)) {
if ($model->submit($dealer, $data['from'])) {
return $this->renderSuccess([], '提现申请已提交成功,请等待审核');
}
return $this->renderError($model->getError() ?: '提交失败');
@ -55,7 +55,8 @@ class Setting extends SettingModel
*/
public static function getFinanceCommission()
return static::getItem(SettingEnum::TRADE)['finance_process'];
$return = empty(static::getItem(SettingEnum::TRADE)['finance_process'])?'':static::getItem(SettingEnum::TRADE)['finance_process'];
return $return;
/**
@ -76,7 +76,7 @@ class Withdraw extends WithdrawModel
//手续费
if (empty($data['is_invoice'])) {
$commission = \app\api\model\Setting::getFinanceCommission();
if (empty($commission)) {
if (!empty($commission)) {
$data['commission_price'] = bcmath($data['money'], $commission / 100, 2);