user = $this->getUser(); // 用户信息 } /** * 提交分销商申请 * @param string $name * @param string $mobile * @return array * @throws \think\exception\DbException * @throws \think\exception\PDOException */ public function submit($name = '', $mobile = '') { $model = new DealerApplyModel; if ($model->submit($this->user, $name, $mobile)) { return $this->renderSuccess(); } return $this->renderError($model->getError() ?: '提交失败'); } }