Browse Source

集成电路招聘会

linwu 2 tháng trước cách đây
mục cha
commit
a8c0359186

+ 8 - 3
app/Http/Controllers/Mobile/Ic/TeachController.php

@@ -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' => '您已提交过,请勿重复提交']);

+ 6 - 6
public/themes/default/views/mobile/app/health/teach/index.blade.php

@@ -1,4 +1,4 @@
-@extends('mobile.module.layouts.health')
+@extends('mobile.module.layouts.ic')
 @push('meta')
 
 @endpush
@@ -26,7 +26,7 @@
                 <div class="n-tit-box">
                     宣讲会/招聘会
                 </div>
-                <div class="return js-back for-event" data-href="{{route('mobile.health.index')}}"></div>
+                <div class="return js-back for-event" data-href="{{route('mobile.ic.index')}}"></div>
             </div>
         </div>
     </div>
@@ -221,7 +221,7 @@
         </div>
         <div class="list_height form-item">
             <div class="pic"></div>
-            <div class="tit font14">简历<span class="font_red_light">*</span></div>
+            <div class="tit font14">简历</div>
             <div class="describe font13">
                 <span id="uploadPicButton">双击上传文件</span>
                 <input type="file" id="uploadFile" accept="application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,text/plain,application/pdf" style="display: none;">
@@ -315,7 +315,7 @@
                 $.ajax({
                     headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
                     type: "POST",
-                    url: "{{ route('mobile.health.teach.uploadHead') }}",
+                    url: "{{ route('mobile.ic.teach.uploadHead') }}",
                     data: submitData,
                     dataType:"json",
                     success: function(result){
@@ -340,14 +340,14 @@
             var data = $(this).serialize();
             $.ajax({
                 headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
-                url: "{{ route('mobile.health.teach.save') }}",
+                url: "{{ route('mobile.ic.teach.save') }}",
                 type: 'POST',
                 dataType: 'json',
                 data: data,
                 success : function(result){
                     if (result.status == 1) {
                         alert('提交成功');
-                        location.href = "{{route('mobile.health.index')}}";
+                        location.href = "{{route('mobile.ic.index')}}";
                     } else {
                         qsToast({type:2,context: result.msg});
                     }

+ 9 - 5
public/themes/default/views/mobile/app/ic/index.blade.php

@@ -64,6 +64,7 @@
     <div class="module-title font14">
         <a href="javascript:;" class="module-title-nav font14 active f-left" data-id="recruit">招聘列表</a>
         <a href="javascript:;" class="module-title-nav font14 f-left" data-id="emergency">引才资讯</a>
+        <a href="javascript:;" class="module-title-nav font14 f-left" data-id="teach">招聘会</a>
         <div class="clear"></div>
     </div>
     <div class="module-box" id="recruit">
@@ -145,12 +146,15 @@
         //     autoplay:3000,
         // });
         $('.module-title-nav').click(function() {
-            console.log(11);
-            $('.module-title-nav').removeClass('active');
-            $(this).addClass('active');
             let id = $(this).data('id');
-            $('.module-box').hide();
-            $('#'+id).show();
+            if (id == "teach") {
+                location.href = "{{route("mobile.ic.teach.index")}}";
+            } else {
+                $('.module-title-nav').removeClass('active');
+                $(this).addClass('active');
+                $('.module-box').hide();
+                $('#' + id).show();
+            }
         });
     </script>
 @endsection

+ 3 - 0
routes/mobile.php

@@ -662,4 +662,7 @@ Route::group([
     $router->get('/recruit/list', 'Mobile\Ic\RecruitController@list')->name('mobile.ic.recruit.list');
     $router->get('/recruit/show', 'Mobile\Ic\RecruitController@show')->name('mobile.ic.recruit.show');
     $router->get('/recruit/apply', 'Mobile\Ic\RecruitController@apply')->name('mobile.ic.recruit.apply');
+    $router->get('/teach', 'Mobile\Health\TeachController@index')->name('mobile.health.teach.index');
+    $router->post('/teach/uploadHead', 'Mobile\Health\TeachController@uploadHead')->name('mobile.health.teach.uploadHead');
+    $router->post('/teach/save', 'Mobile\Health\TeachController@save')->name('mobile.health.teach.save');
 });