|
@@ -44,7 +44,7 @@ class TeachController extends MobileBaseController
|
|
|
{
|
|
|
$district = $this->categoryService->getDefaultDistrict();
|
|
|
$presentation_list = Presentation::where('status', 1)->get();
|
|
|
- return view('mobile.app.ic.teach.index', [
|
|
|
+ return view('mobile.app.health.teach.index', [
|
|
|
'presentation_list' => $presentation_list,
|
|
|
'defaultCity' => $district->defaultCity,
|
|
|
]);
|
|
@@ -52,8 +52,13 @@ class TeachController extends MobileBaseController
|
|
|
|
|
|
public function save(PresentationAppointValidatorRequest $request)
|
|
|
{
|
|
|
- $data = $request->only('pid', 'avatar', 'realname', 'sex', 'mobile', 'birthday', 'native_place', 'fresh', 'education', 'school', 'dep', 'pro_type', 'pro_text', 'attachment');
|
|
|
-
|
|
|
+ $field = ['pid', 'avatar', 'realname', 'sex', 'mobile', 'birthday', 'native_place', 'fresh', 'education', 'school', 'dep', 'pro_type', 'pro_text', 'attachment'];
|
|
|
+ $data = $request->only($field);
|
|
|
+ foreach ($field as $k => $v) {
|
|
|
+ if (empty($data[$k])) {
|
|
|
+ return response()->json(['status' => 0, 'msg' => $v . '不能为空']);
|
|
|
+ }
|
|
|
+ }
|
|
|
$check = PresentationAppoint::where('pid', $data['pid'])->where('mobile', $data['mobile'])->first();
|
|
|
if (!empty($check)) {
|
|
|
return response()->json(['status' => 0, 'msg' => '您已提交过,请勿重复提交']);
|