|
|
@ -12,12 +12,12 @@ declare (strict_types=1); |
|
|
|
|
|
|
|
|
|
|
|
namespace app\api\controller\dealer; |
|
|
|
namespace app\api\controller\dealer; |
|
|
|
|
|
|
|
|
|
|
|
use think\response\Json; |
|
|
|
|
|
|
|
use app\api\controller\Controller; |
|
|
|
use app\api\controller\Controller; |
|
|
|
use app\api\model\dealer\User as DealerUserModel; |
|
|
|
use app\api\model\dealer\User as DealerUserModel; |
|
|
|
use app\api\model\dealer\Withdraw as WithdrawModel; |
|
|
|
use app\api\model\dealer\Withdraw as WithdrawModel; |
|
|
|
use app\api\service\User as UserService; |
|
|
|
use app\api\service\User as UserService; |
|
|
|
use cores\exception\BaseException; |
|
|
|
use cores\exception\BaseException; |
|
|
|
|
|
|
|
use think\response\Json; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 分销商提现 |
|
|
|
* 分销商提现 |
|
|
@ -56,7 +56,8 @@ class Withdraw extends Controller |
|
|
|
$dealer = DealerUserModel::detail($userId); |
|
|
|
$dealer = DealerUserModel::detail($userId); |
|
|
|
// 提交提现申请 |
|
|
|
// 提交提现申请 |
|
|
|
$model = new WithdrawModel; |
|
|
|
$model = new WithdrawModel; |
|
|
|
if ($model->submit($dealer, $this->postForm())) { |
|
|
|
$data = $this->request->post(); |
|
|
|
|
|
|
|
if ($model->submit($dealer, $data)) { |
|
|
|
return $this->renderSuccess([], '提现申请已提交成功,请等待审核'); |
|
|
|
return $this->renderSuccess([], '提现申请已提交成功,请等待审核'); |
|
|
|
} |
|
|
|
} |
|
|
|
return $this->renderError($model->getError() ?: '提交失败'); |
|
|
|
return $this->renderError($model->getError() ?: '提交失败'); |
|
|
|