user = $this->getUser(); // 分销商用户信息 $this->dealer = DealerUserModel::detail($this->user['user_id']); // 分销商设置 $this->setting = Setting::getAll(); } /** * 提交提现申请 * @param $data * @return array * @throws \app\common\exception\BaseException */ public function submit($data) { $formData = json_decode(htmlspecialchars_decode($data), true); $model = new WithdrawModel; if ($model->submit($this->dealer, $formData)) { return $this->renderSuccess([], '提现申请已提交成功,请等待审核'); } return $this->renderError($model->getError() ?: '提交失败'); } /** * 分销商提现明细 * @param int $status * @return array * @throws \think\exception\DbException */ public function lists($status = -1) { $model = new WithdrawModel; return $this->renderSuccess([ // 提现明细列表 'list' => $model->getList($this->user['user_id'], (int)$status), // 页面文字 'words' => $this->setting['words']['values'], ]); } }