|
|
|
@ -102,4 +102,41 @@ class Apply extends Controller |
|
|
|
|
} |
|
|
|
|
return $this->renderError($model->getError() ?: '提交失败'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @notes:更新申请服务商 |
|
|
|
|
* @return Json |
|
|
|
|
* @throws BaseException |
|
|
|
|
* @author: wanghousheng |
|
|
|
|
*/ |
|
|
|
|
public function editApplyProviders(): Json |
|
|
|
|
{ |
|
|
|
|
$real_name = $this->request->post('real_name'); |
|
|
|
|
if (!$real_name) { |
|
|
|
|
return $this->renderError('联系人不能为空'); |
|
|
|
|
} |
|
|
|
|
$mobile = $this->request->post('mobile'); |
|
|
|
|
if (empty($mobile)) { |
|
|
|
|
return $this->renderError('联系电话不能为空'); |
|
|
|
|
} |
|
|
|
|
$shop_type = intval($this->request->post('shop_type', 10)); |
|
|
|
|
$shop_name = $this->request->post('shop_name'); |
|
|
|
|
if (empty($shop_name)) { |
|
|
|
|
return $this->renderError('店铺名称不能为空'); |
|
|
|
|
} |
|
|
|
|
$business = $this->request->post('business'); |
|
|
|
|
if (empty($business)) { |
|
|
|
|
return $this->renderError('经营类型不能为空'); |
|
|
|
|
} |
|
|
|
|
$city = $this->request->post('city'); |
|
|
|
|
if (empty($city)) { |
|
|
|
|
return $this->renderError('所在城市不能为空'); |
|
|
|
|
} |
|
|
|
|
$data = compact('business', 'city', 'real_name', 'mobile', 'shop_type', 'shop_name', 'business', 'city'); |
|
|
|
|
$model = new DealerApplyModel; |
|
|
|
|
if ($model->editApplyServiceProviders($data)) { |
|
|
|
|
return $this->renderSuccess('提交成功'); |
|
|
|
|
} |
|
|
|
|
return $this->renderError($model->getError() ?: '提交失败'); |
|
|
|
|
} |
|
|
|
|
} |