Forráskód Böngészése

人才购房后台

linwu 4 éve
szülő
commit
1c7daf57e7

+ 233 - 0
app/Admin/Controllers/Content/BuyHouseController.php

@@ -0,0 +1,233 @@
+<?php
+
+namespace App\Admin\Controllers\Content;
+
+use App\Admin\Exports\Content\RecuperateExport;
+use App\Admin\Extensions\Form\ValidateForm;
+use App\Http\Controllers\Controller;
+use App\Models\Recuperate;
+use App\Models\RecuperateApply;
+use App\Models\RecuperateCategory;
+use App\Models\TalentHouse;
+use App\Models\TalentHouseApply;
+use Encore\Admin\Controllers\HasResourceActions;
+use Encore\Admin\Facades\Admin as userAdmin;
+use Encore\Admin\Form;
+use Encore\Admin\Grid;
+use Encore\Admin\Layout\Content;
+use Illuminate\Http\Request;
+use Illuminate\Support\Collection;
+
+class BuyHouseController extends Controller
+{
+    use HasResourceActions;
+
+    private $house_status = ['未知', '未开始', '申报中', '已结束'];
+
+    /**
+     * Index interface.
+     *
+     * @param Content $content
+     * @return Content
+     */
+    public function index(Content $content)
+    {
+        return $content
+            ->header('房源列表')
+            ->description(' ')
+            ->body(view('admin.content.buy_house')->with(['grid' => $this->grid()]));
+    }
+
+    /**
+     * Edit interface.
+     *
+     * @param mixed $id
+     * @param Content $content
+     * @return Content
+     */
+    public function edit($id, Content $content)
+    {
+        return $content
+            ->header('房源')
+            ->description(' ')
+            ->body($this->editForm($id)->edit($id));
+    }
+
+    /**
+     * Create interface.
+     *
+     * @param Content $content
+     * @return Content
+     */
+    public function create(Content $content)
+    {
+        return $content
+            ->header('房源')
+            ->description(' ')
+            ->body($this->form());
+    }
+
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        $grid = new Grid(new TalentHouse());
+
+        $grid->model()->orderBy('updated_at', 'DESC');
+
+        $status_text = $this->house_status;
+        $grid->id('ID');
+        $grid->name('项目名称');
+        $grid->small_img('缩略图')->display(function () {
+            if ($this->small_img) {
+                return '<span class="vtip" title="<img src=\'' . upload_asset($this->small_img) . '\'  height=120>">
+                            <img class="avatar small" src="' . upload_asset($this->small_img) . '" align="absmiddle" style="width: 22px;height: 22px;">
+                        </span>';
+            } else {
+                return '';
+            }
+        });
+        $grid->status('状态')->display(function () use ($status_text) {
+            return $status_text[$this->status];
+        });
+        $grid->declare_time('申报时间')->display(function () {
+            return date('Y-m-d', strtotime($this->declare_time));
+        });
+        $grid->column('报名时间')->display(function () {
+            return date('Y-m-d', strtotime($this->apply_time_start)) . '至' . date('Y-m-d', strtotime($this->apply_time_end));
+        });
+
+        //新增按钮
+        $grid->disableCreateButton(false);
+
+        //批量删除
+        $grid->tools(function ($tools) {
+            $tools->batch(function ($batch) {
+                $batch->disableDelete(false);
+            });
+        });
+
+        $grid->actions(function ($actions) {
+            $actions->disableEdit(false);
+            $actions->disableDelete(false);
+        });
+
+        $grid->filter(function ($filter) {
+            $filter->disableIdFilter();
+            $filter->like('name', '项目名称');
+            $status_option = ['全部', '未开始', '申报中', '已结束'];
+            $filter->where(function ($query) {
+                if ($this->input > 0) {
+                    $query->where('status', '=', $this->input);
+                }
+            }, '状态', 'status')->radio($status_option);
+        });
+        return $grid;
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        $form = new ValidateForm(new TalentHouse());
+        $form->text('name', '项目名称')->rules('required|max:100', ['required' => '标题不能为空。', 'max' => '标题长度不能大于100。'])->setWidth(4)->setMustMark();
+        $form->datetime('declare_time', '申报时间')->rules('required', ['required' => '申报时间不能为空。'])->setWidth(4)->setMustMark();
+        $form->datetime('apply_time_start', '报名开始时间')->rules('required', ['required' => '报名开始时间不能为空。'])->setWidth(4)->setMustMark();
+        $form->datetime('apply_time_end', '报名结束时间')->rules('required', ['required' => '报名结束时间不能为空。'])->setWidth(4)->setMustMark();
+        $form->text('address', '地址')->rules('required|max:100', ['required' => '地址不能为空。', 'max' => '地址长度不能大于100。'])->setWidth(8)->setMustMark();
+        $form->radio('status', '状态')->rules('required', ['required' => '请选择状态。'])->options([1 => '未开始', 2 => '申报中', 3 => '已结束'])->setWidth(8)->setMustMark();
+        $form->image('small_img', '缩略图')->uniqueName()->rules('image|mimes:jpeg,bmp,png', ['image' => '缩略图请选择图片文件。', 'mimes' => '请选择jpeg,bmp,png格式的缩略图上传。'])->setWidth(4);
+        $form->textarea('describe', '描述')->rules('required|max:1024', ['required' => '描述不能为空。', 'max' => '描述长度不能大于1024。'])->setWidth(8)->setMustMark();
+        $form->editor('content', '内容')->rules('required', ['required' => '内容不能为空。'])->setMustMark();
+
+        $form->saved(function (Form $form) {
+            //如果没有上传logo,判断是否
+            $small_img = \Illuminate\Support\Facades\Request::input('small_img');
+            if (!$form->model()->small_img && $small_img) {
+                $form->model()->small_img = $small_img;
+                $form->model()->save();
+            }
+        });
+
+        $form->footer(function ($footer) {
+            $footer->disableViewCheck();
+            $footer->disableEditingCheck();
+            $footer->disableCreatingCheck();
+            $footer->disableReset();
+        });
+        return $form;
+    }
+
+    protected function editForm($id)
+    {
+        $form = new ValidateForm(new TalentHouse());
+        $form->text('name', '项目名称')->rules('required|max:100', ['required' => '标题不能为空。', 'max' => '标题长度不能大于100。'])->setWidth(4)->setMustMark();
+        $form->datetime('declare_time', '申报时间')->rules('required', ['required' => '申报时间不能为空。'])->setWidth(4)->setMustMark();
+        $form->datetime('apply_time_start', '报名开始时间')->rules('required', ['required' => '报名开始时间不能为空。'])->setWidth(4)->setMustMark();
+        $form->datetime('apply_time_end', '报名结束时间')->rules('required', ['required' => '报名结束时间不能为空。'])->setWidth(4)->setMustMark();
+        $form->text('address', '地址')->rules('required|max:100', ['required' => '地址不能为空。', 'max' => '地址长度不能大于100。'])->setWidth(8)->setMustMark();
+        $form->radio('status', '状态')->rules('required', ['required' => '请选择状态。'])->options([1 => '未开始', 2 => '申报中', 3 => '已结束'])->setWidth(8)->setMustMark();
+        $form->image('small_img', '缩略图')->uniqueName()->rules('image|mimes:jpeg,bmp,png', ['image' => '缩略图请选择图片文件。', 'mimes' => '请选择jpeg,bmp,png格式的缩略图上传。'])->setWidth(4);
+        $form->textarea('describe', '描述')->rules('required|max:1024', ['required' => '描述不能为空。', 'max' => '描述长度不能大于1024。'])->setWidth(8)->setMustMark();
+        $form->editor('content', '内容')->rules('required', ['required' => '内容不能为空。'])->setMustMark();
+
+        $form->saved(function (Form $form) {
+            //如果没有上传logo,判断是否
+            $small_img = \Illuminate\Support\Facades\Request::input('small_img');
+            if (!$form->model()->small_img && $small_img) {
+                $form->model()->small_img = $small_img;
+                $form->model()->save();
+            }
+        });
+
+        $form->footer(function ($footer) {
+            $footer->disableViewCheck();
+            $footer->disableEditingCheck();
+            $footer->disableCreatingCheck();
+            $footer->disableReset();
+        });
+        $form->tools(function (Form\Tools $tools) {
+            $tools->disableDelete();
+            $tools->disableView();
+        });
+        return $form;
+    }
+
+    public function update($id)
+    {
+        return $this->editForm($id)->update($id);
+    }
+
+    public function destroy($id)
+    {
+        //是否存在报名列表
+        $ids   = explode(',', $id);
+        $check = TalentHouseApply::whereIn('house_id', $ids)->count();
+        if ($check > 0) {
+            return response()->json([
+                'status'  => false,
+                'message' => '存在申报信息的房源不允许删除!',
+            ]);
+        }
+
+        if ($this->form()->destroy($id)) {
+            $data = [
+                'status'  => true,
+                'message' => trans('admin.delete_succeeded'),
+            ];
+        } else {
+            $data = [
+                'status'  => false,
+                'message' => trans('admin.delete_failed'),
+            ];
+        }
+        return response()->json($data);
+    }
+}

+ 210 - 0
app/Admin/Controllers/Content/BuyHouseRsController.php

@@ -0,0 +1,210 @@
+<?php
+
+namespace App\Admin\Controllers\Content;
+
+use App\Admin\Exports\Content\RecuperateExport;
+use App\Admin\Extensions\Form\ValidateForm;
+use App\Http\Controllers\Controller;
+use App\Models\Recuperate;
+use App\Models\RecuperateApply;
+use App\Models\RecuperateCategory;
+use App\Models\TalentHouse;
+use App\Models\TalentHouseApply;
+use Encore\Admin\Controllers\HasResourceActions;
+use Encore\Admin\Facades\Admin as userAdmin;
+use Encore\Admin\Form;
+use Encore\Admin\Grid;
+use Encore\Admin\Layout\Content;
+use Illuminate\Http\Request;
+use Illuminate\Support\Collection;
+
+class BuyHouseRsController extends Controller
+{
+    use HasResourceActions;
+
+    private $status = ['未知', '待审核', '审核通过', '审核不通过'];
+    private $marry = ['未知', '未婚', '已婚', '离异', '丧偶'];
+
+    /**
+     * Index interface.
+     *
+     * @param Content $content
+     * @return Content
+     */
+    public function index(Content $content)
+    {
+        return $content
+            ->header('申报列表')
+            ->description(' ')
+            ->body(view('admin.content.buy_house_rs')->with(['grid' => $this->grid()]));
+    }
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        $grid = new Grid(new TalentHouseApply());
+
+        $grid->model()->with('house')->orderBy('rs_check_status', 'ASC');
+
+        $status_text = $this->status;
+        $grid->id('ID');
+        $grid->name('姓名');
+        $grid->mobile('联系电话');
+        $grid->talent_level('人才层次');
+        $grid->column('房源')->display(function () {
+            return $this->house->name;
+        });
+        $grid->rs_check_status('状态')->display(function () use ($status_text) {
+            return $status_text[$this->rs_check_status];
+        });
+        $grid->rs_check_comment('备注');
+
+        $grid->actions(function ($actions) {
+            if ($actions->row['rs_check_status'] == 1) {
+                $actions->append("<button class='btn btn-primary btn-xs applyaudit' data-code=" . $actions->row['id'] . ">审核</button>");
+            }
+            $actions->append("&nbsp;<button class='btn btn-primary btn-xs detail' id=" . $actions->row['id'] . ">详情</button>");
+        });
+
+        $grid->filter(function ($filter) {
+            $filter->disableIdFilter();
+            $filter->equal('house_id', '房源')->select(TalentHouse::all()->pluck('name', 'id'));
+            $status_option = ['全部', '待审核', '审核通过', '审核不通过'];
+            $filter->where(function ($query) {
+                if ($this->input > 0) {
+                    $query->where('status', '=', $this->input);
+                }
+            }, '状态', 'status')->radio($status_option);
+        });
+        return $grid;
+    }
+
+    /**
+     * 审核
+     */
+    public function audit(Request $request)
+    {
+        $id     = $request->id;
+        $status = $request->status;
+        $reason = $request->reason;
+        $url    = empty($request->url) ? '/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/content/buy_house_rs' : $request->url;
+        if (empty($id)) {
+            admin_toastr('数据异常', 'error');
+            return redirect('/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/content/buy_house_rs');
+        }
+        $result = TalentHouseApply::where('id', '=', $id)
+            ->update([
+                'rs_check_status'  => $status,
+                'rs_check_comment' => $reason,
+                'rs_check_time'    => date('Y-m-d H:i:s'),
+            ]);
+        if ($result) {
+            admin_toastr('审核成功', 'success');
+        } else {
+            admin_toastr('该信息不存在或已审核', 'error');
+        }
+
+        return redirect($url);
+    }
+
+    /**
+     * 详情
+     */
+    public function detail(Request $request)
+    {
+        $id   = $request->id;
+        $info = TalentHouseApply::find($id);;
+        $info->family = json_decode($info->family);
+        $info->marry_text = $this->marry[$info->marry];
+
+        //layer相册层
+        $photos = [
+            'certificates'       => [],
+            'marry_prove'        => [],
+            'household_register' => [],
+            'work_prove'         => [],
+        ];
+        if (!empty(json_decode($info->certificates))) {
+            $info->certificates = json_decode($info->certificates);
+            $photo_data         = [];
+            foreach ($info->certificates as $k => $v) {
+                $photo_data[] = [
+                    'alt' => $v->name,
+                    'pid' => $v->uid,
+                    'src' => $v->response->path,
+                ];
+            }
+            $photos['certificates'] = [
+                'title' => '证件信息',
+                'id'    => 1,
+                'start' => 0,
+                'data'  => $photo_data,
+            ];
+        } else {
+            $info->certificates = [];
+        }
+        if (!empty(json_decode($info->marry_prove))) {
+            $info->marry_prove = json_decode($info->marry_prove);
+            $photo_data        = [];
+            foreach ($info->marry_prove as $k => $v) {
+                $photo_data[] = [
+                    'alt' => $v->name,
+                    'pid' => $v->uid,
+                    'src' => $v->response->path,
+                ];
+            }
+            $photos['marry_prove'] = [
+                'title' => '婚姻证明',
+                'id'    => 1,
+                'start' => 0,
+                'data'  => $photo_data,
+            ];
+        } else {
+            $info->marry_prove = [];
+        }
+        if (!empty(json_decode($info->household_register))) {
+            $info->household_register = json_decode($info->household_register);
+            $photo_data               = [];
+            foreach ($info->household_register as $k => $v) {
+                $photo_data[] = [
+                    'alt' => $v->name,
+                    'pid' => $v->uid,
+                    'src' => $v->response->path,
+                ];
+            }
+            $photos['household_register'] = [
+                'title' => '户口本',
+                'id'    => 1,
+                'start' => 0,
+                'data'  => $photo_data,
+            ];
+        } else {
+            $info->household_register = [];
+        }
+        if (!empty(json_decode($info->work_prove))) {
+            $info->work_prove = json_decode($info->work_prove);
+            $photo_data       = [];
+            foreach ($info->work_prove as $k => $v) {
+                $photo_data[] = [
+                    'alt' => $v->name,
+                    'pid' => $v->uid,
+                    'src' => $v->response->path,
+                ];
+            }
+            $photos['work_prove'] = [
+                'title' => '在职证明',
+                'id'    => 1,
+                'start' => 0,
+                'data'  => $photo_data,
+            ];
+        } else {
+            $info->work_prove = [];
+        }
+        $html = view('admin.ajax.buy_house_detail')->with(['info' => $info, 'photos' => $photos])->render();
+        return response()->json(['code' => 1, 'data' => $html]);
+    }
+}

+ 47 - 48
app/Admin/Controllers/Content/RecuperateApplyController.php

@@ -42,7 +42,7 @@ class RecuperateApplyController extends Controller
 
         $grid->model()->orderBy('created_at', 'DESC');
 
-       $grid->recuperate_id('套餐id');
+        $grid->recuperate_id('套餐id');
         $grid->column('套餐标题')->display(function () {
             //套餐被删除
             if (empty($this->recuperate)) {
@@ -177,43 +177,43 @@ class RecuperateApplyController extends Controller
     }
 
     public function audit(Request $request)
-{
-    $id     = $request->id;
-    $status = $request->status;
-    $reason = $request->reason;
-    $url = empty($request->url) ? '/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/content/recuperate/apply' : $request->url;
-    if (empty($id)) {
-        admin_toastr('数据异常', 'error');
-        return redirect('/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/content/recuperate/apply');
-    }
-    $result = RecuperateApply::where('id', '=', $id)->update(['status' => $status, 'reason' => $reason]);
-    if ($result) {
-        admin_toastr('审核成功', 'success');
-    } else {
-        admin_toastr('该信息不存在或已审核', 'error');
-    }
+    {
+        $id     = $request->id;
+        $status = $request->status;
+        $reason = $request->reason;
+        $url    = empty($request->url) ? '/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/content/recuperate/apply' : $request->url;
+        if (empty($id)) {
+            admin_toastr('数据异常', 'error');
+            return redirect('/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/content/recuperate/apply');
+        }
+        $result = RecuperateApply::where('id', '=', $id)->update(['status' => $status, 'reason' => $reason]);
+        if ($result) {
+            admin_toastr('审核成功', 'success');
+        } else {
+            admin_toastr('该信息不存在或已审核', 'error');
+        }
 
-    return redirect($url);
-}
+        return redirect($url);
+    }
 
     public function audit_qx(Request $request)
     {
-        $id     = $request->id;
-      //  $status = $request->status;
-      //  $reason = $request->reason;
+        $id = $request->id;
+        //  $status = $request->status;
+        //  $reason = $request->reason;
         $url = empty($request->url) ? '/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/content/recuperate/apply' : $request->url;
         if (empty($id)) {
             admin_toastr('数据异常1', 'error');
             return redirect('/ST3IXxKlOa4eGEv0eTw0CfORI9444Mgj/content/recuperate/apply');
         }
-        $result = RecuperateApply::where('id', '=', $id)->update(['status' => 3]);
-       $recuperate_apply= RecuperateApply::where('id', '=', $id)->select('uid')->first();
-        $auditData = array(
-            'type' => 2,
+        $result           = RecuperateApply::where('id', '=', $id)->update(['status' => 3]);
+        $recuperate_apply = RecuperateApply::where('id', '=', $id)->select('uid')->first();
+        $auditData        = [
+            'type'     => 2,
             'admin_id' => \Encore\Admin\Facades\Admin::user()->id,
-            'sid' => $recuperate_apply->uid,
-            'content' => "取消活动"
-        );
+            'sid'      => $recuperate_apply->uid,
+            'content'  => "取消活动",
+        ];
         RecuperateLog::create($auditData);
         if ($result) {
             admin_toastr('取消成功', 'success');
@@ -229,32 +229,32 @@ class RecuperateApplyController extends Controller
     public function appointinfo(Content $content, Request $request)
     {
 
-        $uid = $request->uid;
-        $recuperateApply = RecuperateApply::where('uid',$uid);
-        $recuperateTime=RecuperateTime::where('uid',$uid)->select('id','year')->orderBy('id','desc')->get();
+        $uid             = $request->uid;
+        $recuperateApply = RecuperateApply::where('uid', $uid);
+        $recuperateTime  = RecuperateTime::where('uid', $uid)->select('id', 'year')->orderBy('id', 'desc')->get();
         if (empty($recuperateApply)) {
             return back();
         }
 
         $search_data = $request->all();
 
-        $search_data['uid']=isset($search_data['uid'])?$search_data['uid']:$uid;
-        $search_data['status']=isset($search_data['status'])?$search_data['status']:1;
-        $search_data['recuperate_time_id']=isset($search_data['recuperate_time_id'])?$search_data['recuperate_time_id']:$recuperateTime[0]->id;
-        $where = [];
+        $search_data['uid']                = isset($search_data['uid']) ? $search_data['uid'] : $uid;
+        $search_data['status']             = isset($search_data['status']) ? $search_data['status'] : 1;
+        $search_data['recuperate_time_id'] = isset($search_data['recuperate_time_id']) ? $search_data['recuperate_time_id'] : $recuperateTime[0]->id;
+        $where                             = [];
         if (isset($search_data['perpage'])) {
-            $perpage=$search_data['perpage'];
-        }else{
+            $perpage = $search_data['perpage'];
+        } else {
             $session_data = session('search_data');
-            if(isset($session_data['perpage'])){
-                $perpage=$session_data['perpage'];
-            }else{
-                $perpage=20;
+            if (isset($session_data['perpage'])) {
+                $perpage = $session_data['perpage'];
+            } else {
+                $perpage = 20;
             }
 
         }
 
-      if (isset($search_data['uid']) || session('manage_search_data')['uid']) {
+        if (isset($search_data['uid']) || session('manage_search_data')['uid']) {
             if (isset($search_data['page'])) {
                 if (session('search_data')) {
                     $where = session('managewhere');
@@ -269,7 +269,7 @@ class RecuperateApplyController extends Controller
                     $where[] = ['recuperate_apply.status', 'like', "%$v%"];
                 } elseif ($k == 'recuperate_time_id') {
                     $where[] = ['recuperate_apply.recuperate_time_id', '=', $v];
-                }elseif ($k == 'uid') {
+                } elseif ($k == 'uid') {
                     $where[] = ['recuperate_apply.uid', '=', $v];
                 } elseif ($k != '_pjax' and $k != 'page' && $k != 'perpage') {
                     $where[] = [$k, '=', $v];
@@ -281,19 +281,18 @@ class RecuperateApplyController extends Controller
         }
 
 
-
         $list = RecuperateApply::where($where)
             ->join('recuperate', 'recuperate_apply.recuperate_id', '=', 'recuperate.id', 'left')
             ->join('recuperate_time', 'recuperate_apply.recuperate_time_id', '=', 'recuperate_time.id', 'left')
-            ->select('recuperate_apply.*', 'recuperate.title','recuperate_time.year')
-            ->orderBy('recuperate_apply.id','desc')
+            ->select('recuperate_apply.*', 'recuperate.title', 'recuperate_time.year')
+            ->orderBy('recuperate_apply.id', 'desc')
             ->paginate($perpage);
         return $content
             ->header('招考管理')
             ->description('招考人员信息列表')
             ->body(view('admin.content.recuperate_apply_personal')->with([
-                'list' => $list,
-                'search_data' => $search_data,
+                'list'           => $list,
+                'search_data'    => $search_data,
                 'recuperateTime' => $recuperateTime,
             ]));
 

+ 6 - 0
app/Admin/routes.php

@@ -319,6 +319,12 @@ Route::group([
         $router->get('export_recuperate_apply', 'RecuperateController@exportApply')->name('recuperate.export_apply');
 
         $router->resource('rcstfwlt', RcstfwltController::class);
+
+        //人才购房
+        $router->resource('buy_house', BuyHouseController::class)->names('content.buy_house');
+        $router->get('buy_house_rs', 'BuyHouseRsController@index')->name('content.buy_house_rs');
+        $router->get('buy_house_rs/detail', 'BuyHouseRsController@detail')->name('content.buy_house_rs.detail');
+        $router->post('buy_house_rs/audit', 'BuyHouseRsController@audit')->name('content.buy_house_rs.audit');
     });
 
     //系统管理

+ 54 - 26
app/Http/Controllers/Web/Content/BuyhouseController.php

@@ -8,12 +8,8 @@ use App\Models\Resume;
 use App\Models\TalentHouse;
 use App\Models\TalentHouseApply;
 use App\Services\Content\ArticleService;
-use App\Services\Content\ArticleCategoryService;
-use App\Services\Content\AdService;
-use App\Services\Content\NavigationService;
 use Illuminate\Http\Request;
-use Illuminate\Support\Facades\Cache;
-use Illuminate\Support\Collection;
+use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Storage;
 use Illuminate\Support\Facades\Validator;
 
@@ -29,21 +25,15 @@ class BuyhouseController extends WebBaseController
     private $check_type = ['', 'warning', 'success', 'error'];
     private $talent_level = ['不是人才', '第一层次', '第二层次', '第三层次', '第四层次', '第五层次', '第六层次', '第七层次'];
     protected $articleService;
-    protected $articleCategoryService;
-    protected $adService;
-    protected $navigationService;
 
     /**
      * ArticleController constructor.
      * @param $articleService
      * @param $articleCategoryService
      */
-    public function __construct(ArticleService $articleService, ArticleCategoryService $articleCategoryService, AdService $adService, NavigationService $navigationService)
+    public function __construct(ArticleService $articleService)
     {
-        $this->articleService         = $articleService;
-        $this->articleCategoryService = $articleCategoryService;
-        $this->adService              = $adService;
-        $this->navigationService      = $navigationService;
+        $this->articleService = $articleService;
     }
 
     /**
@@ -55,7 +45,7 @@ class BuyhouseController extends WebBaseController
         $return_data = ['user_id' => $user_id ?: 0, 'apply' => '[]'];
 
         //房源
-        $house = TalentHouse::orderBy('updated_at', 'desc')->limit(10)->get();
+        $house = TalentHouse::orderBy('updated_at', 'desc')->orderByRaw(DB::raw("FIELD(status,2,1,3)"))->limit(8)->get();
         foreach ($house as $v) {
             $v['declare_time_text'] = date('Y-m-d', strtotime($v['declare_time']));
             $v['status_text']       = $this->house_status[$v['status']];
@@ -74,7 +64,11 @@ class BuyhouseController extends WebBaseController
 
         //我的申报
         if ($user_id > 0) {
-            $apply = TalentHouseApply::with('house')->select(['id', 'house_id', 'status'])->where('user_id', $user_id)->get();
+            $apply = TalentHouseApply::with('house')
+                ->select(['id', 'house_id', 'status'])
+                ->where('is_draft', 2)
+                ->where('user_id', $user_id)
+                ->get();
             foreach ($apply as $v) {
                 $v['status_text'] = $this->apply_status[$v['status']];
                 $v['status_tag']  = $this->tag_status[$v['status']];
@@ -89,13 +83,19 @@ class BuyhouseController extends WebBaseController
     /**
      * 房源信息
      */
-    public function house()
+    public function house(Request $request)
     {
+        $lists = TalentHouse::orderByRaw(DB::raw("FIELD(status,2,1,3)"))->paginate(10);
+        foreach ($lists as $v) {
+            $v['status_text'] = $this->house_status[$v['status']];
+            $v['status_tag']  = $this->tag_status[$v['status']];
+        }
 
-
-        return view('app.content.buyhouse.house', [
+        $return_data = [
+            'articles' => $lists,
             'now_cate' => '房源信息',
-        ]);
+        ];
+        return view('app.content.buyhouse.house', $return_data);
     }
 
     /**
@@ -103,9 +103,14 @@ class BuyhouseController extends WebBaseController
      */
     public function news()
     {
-        return view('app.content.buyhouse.news', [
+        $lists = $this->articleService->list('', 56, '10');
+
+        $return_data = [
+            'articles' => $lists,
             'now_cate' => '公告',
-        ]);
+        ];
+
+        return view('app.content.buyhouse.news', $return_data);
     }
 
     /**
@@ -140,6 +145,10 @@ class BuyhouseController extends WebBaseController
         $apply = TalentHouseApply::where('house_id', $id)->where('user_id', $user_id)->first();
         $check = [];
         if ($apply) {
+            if ($house['status'] != 2 && $apply['is_draft'] == 1) {
+                $back_url = \Illuminate\Support\Facades\URL::previous();
+                return $this->showMessage('该房源未在申报时间', $back_url, true, '上一页', '3');
+            }
             //审核状态
             if ($apply['is_draft'] == 2) {
                 if ($apply['rs_check_status'] != 2) {
@@ -158,6 +167,11 @@ class BuyhouseController extends WebBaseController
                 }
             }
         } else {
+            if ($house['status'] != 2) {
+                $back_url = \Illuminate\Support\Facades\URL::previous();
+                return $this->showMessage('该房源未在申报时间', $back_url, true, '上一页', '3');
+            }
+
             $time   = time();
             $resume = Resume::where('uid', $user_id)->where('def', 1)->first();
             if (empty($resume) || empty($resume['idcard'])) {
@@ -175,6 +189,10 @@ class BuyhouseController extends WebBaseController
                 $back_url = \Illuminate\Support\Facades\URL::previous();
                 return $this->showMessage('您还未认定人才,暂无申报资格', $back_url, true, '上一页', '3');
             }
+            if ($talent['type'] != 1) {
+                $back_url = \Illuminate\Support\Facades\URL::previous();
+                return $this->showMessage('目前仅支持晋江高层次人才申报', $back_url, true, '上一页', '3');
+            }
             $talent = $talent['obj'][0];
             $add    = [
                 'user_id'              => $user_id,
@@ -185,7 +203,7 @@ class BuyhouseController extends WebBaseController
                 'email'                => $talent['email'],
                 'talent_level'         => $this->talent_level[$talent['talentArrange']],
                 'talent_card_validity' => $talent['activeDate'],
-                'talent_tags'          => '',
+                'talent_tags'          => $talent['talentType'],
                 'talent_condition'     => $talent['identifyCondition'],
                 'family'               => json_encode([['relation' => '', 'realname' => '', 'idcard' => '']]),
                 'certificates'         => '[]',
@@ -206,11 +224,21 @@ class BuyhouseController extends WebBaseController
         $apply['work_prove']         = json_decode($apply['work_prove'], true);
         $apply['checked']            = true;
 
+        $formDisable = 'false';
+        if ($house['status'] == 2) {
+            if ($apply['is_draft'] == 1) {
+                $formDisable = 'true';
+            } elseif ($apply['rs_check_status'] == 3 || $apply['zj_check_status'] == 3) {
+                $formDisable = 'true';
+            }
+        }
+
         $return_data = [
-            'check'  => $check,
-            'apply'  => json_encode($apply),
-            'house'  => json_encode($house),
-            'module' => ['identification'],
+            'formDisable' => $formDisable,
+            'check'       => $check,
+            'apply'       => json_encode($apply),
+            'house'       => json_encode($house),
+            'module'      => ['identification'],
         ];
 
         return view('app.content.buyhouse.list', $return_data);

+ 87 - 0
public/themes/default/views/app/content/buyhouse/house.blade.php

@@ -0,0 +1,87 @@
+@extends('module.layouts.content')
+
+@push('meta')
+
+@endpush
+
+@push('css')
+<link href="{{ theme_asset('app/css/common.css') }}" rel="stylesheet">
+<link rel="stylesheet" type="text/css" href="{{ theme_asset('app/css/article/article.css') }}"/>
+<style>
+    .tag {padding:0 5px;color:white;}
+    .tag.success {background:#67c23a;}
+    .tag.info {background:#909399;}
+    .tag.danger {background:#f56c6c;}
+</style>
+@endpush
+
+@push('js')
+
+@endpush
+
+@section('content')
+    <img src="{{ theme_asset('app/images/buyhouse/header.jpg') }}" style="display:block;width:100%;">
+    <div class="newslip">
+        <div class="l">
+
+            <div class="newsnav">
+                <a href="{{route('buyhouse.house')}}" class="select">房源信息</a>
+                <a href="{{route('buyhouse.news')}}">公告</a>
+                <div class="clear"></div>
+            </div>
+            <div class="newslist">
+                <div class="link_gray6 tit">
+                    <a href="{{route('buyhouse.login')}}">购房系统</a>
+                    <span>></span><a href="#">{{$now_cate}}</a>
+                </div>
+                <div id="news_list">
+                    @if($articles->total())
+                    @foreach($articles as $k=>$v)
+                    <div class="listb @if(!$v->small_img) news_noimg @endif">
+                        <div class="bl">
+                            <div class="pic"><img src="{{upload_asset($v->small_img)}}" border="0"></div>
+                        </div>
+                        <div class="br link_gray6">
+                            <div class="t substring">
+                                <a  href="{{route('buyhouse.list',['id'=>$v->id])}}">
+                                    {!! $v->name !!}
+                                </a>
+                            </div>
+                            <div class="time substring">
+                                <span class="tag">{{$v->status_text}}</span>
+                                <span class="time1">{{date('Y-m-d',strtotime($v->declare_time))}}</span>
+                            </div>
+                            <div class="clear"></div>
+                            <div class="summary">{!!  $v->describe !!}</div>
+                        </div>
+                        <div class="clear"></div>
+                    </div>
+                    @endforeach
+                    {{ $articles->links('module.widgets.pagination') }}
+                    @else
+                    <div class="list_empty_group">
+                        <div class="list_empty">
+                            <div class="list_empty_left"></div>
+                            <div class="list_empty_right">
+                                <div class="sorry_box">对不起,暂无相关资讯!</div>
+                            </div>
+                            <div class="clear"></div>
+                        </div>
+                    </div>
+                    @endif
+                </div>
+            </div>
+        </div>
+        <div class="r">
+        </div>
+        <div class="clear"></div>
+    </div>
+    @endsection
+
+    @section('script')
+    <script>
+        $(function(){
+
+        });
+    </script>
+    @endsection

+ 1 - 1
public/themes/default/views/app/content/buyhouse/list.blade.php

@@ -586,7 +586,7 @@
                         ],
                     },
                     list: [{!!$house!!}],
-                    formDisable: false,
+                    formDisable: {!! $formDisable !!},
                 };
             },
             methods: {

+ 242 - 0
resources/views/admin/ajax/buy_house_detail.blade.php

@@ -0,0 +1,242 @@
+<link rel="stylesheet" href="{{theme_asset('statistics/js/layer/skin/default/layer.css')}}?t=1">
+<style>
+    .table_form,.table_form tr th, .table_form tr td { border:1px solid #ccc; padding: 0 7px}
+    .table_form { width: 100%; min-height: 25px; line-height: 25px; text-align: center; border-collapse: collapse; padding:2px; max-width: 1200px}
+    .avatar {
+        width: 178px;
+        height: 178px;
+        display: block;
+    }
+    .attchment{
+        width: 200px;
+        height: 200px;
+    }
+</style>
+<script src="{{ theme_asset('statistics/js/layer/layer.js') }}"></script>
+<table cellspacing="0" width="100%" class="table_form">
+    <tr style="height:60px;page-break-inside:avoid">
+        <td colspan="12">
+            <h1>个人信息</h1>
+        </td>
+    </tr>
+    <tr style="height:52px;page-break-inside:avoid">
+        <td valign="center" style="width:100px;">姓名</td>
+        <td valign="center" colspan="3" style="width:300px;">
+            {{$info->name}}
+        </td>
+        <td valign="center" style="width:100px;">联系电话</td>
+        <td valign="center" colspan="3" style="width:300px;">
+            {{$info->mobile}}
+        </td>
+        <td valign="center" style="width:100px;">籍贯</td>
+        <td valign="center" colspan="3" style="width:300px;">
+            {{$info->native}}
+        </td>
+    </tr>
+    <tr style="height:52px;page-break-inside:avoid">
+        <td valign="center">电子邮箱</td>
+        <td valign="center" colspan="3">
+            {{$info->email}}
+        </td>
+        <td valign="center">人才层次</td>
+        <td valign="center" colspan="3">
+            {{$info->talent_level}}
+        </td>
+        <td valign="center">人才证有效期</td>
+        <td valign="center" colspan="3">
+            {{$info->talent_card_validity}}
+        </td>
+    </tr>
+    <tr style="height:52px;page-break-inside:avoid">
+        <td valign="center">人才标签</td>
+        <td valign="center" colspan="3">
+            {{$info->talent_tags}}
+        </td>
+
+        <td valign="center">人才认定条件</td>
+        <td valign="center" colspan="6">
+            {{$info->talent_condition}}
+        </td>
+    </tr>
+    <tr style="height:52px;page-break-inside:avoid">
+        <td valign="center" >
+            证件信息
+        </td>
+        <td valign="center" colspan="11">
+            <div style="padding: 10px 0">
+                @foreach($info->certificates as $k => $v)
+                    <img class="attchment" data-key="{{$k}}" data-name="certificates" src="{{ $v->response->path }}" />
+                @endforeach
+            </div>
+        </td>
+    </tr>
+</table>
+<table cellspacing="0" width="100%" class="table_form">
+    <tr style="height:60px;page-break-inside:avoid">
+        <td colspan="12">
+            <h1>家庭资料</h1>
+        </td>
+    </tr>
+    <tr>
+        <td valign="center">婚姻状况</td>
+        <td valign="center" colspan="5">
+            {{$info->marry_text}}
+        </td>
+    </tr>
+    @if($info->marray > 1)
+        <tr style="height:52px;page-break-inside:avoid">
+            <td valign="center">
+                婚姻证明<br/>
+                (结婚证,离婚证,离婚生效文书、丧偶证明等)
+            </td>
+            <td valign="center" colspan="3">
+                @foreach($info->marry_prove as $k => $v)
+                    <img class="attchment" data-key="{{$k}}" data-name="marry_prove" src="{{ $v->response->path }}" />
+                @endforeach
+            </td>
+        </tr>
+    @endif
+    <tr style="height:52px;page-break-inside:avoid">
+        <td valign="center">
+            户口本
+        </td>
+        <td valign="center" colspan="3">
+            @foreach($info->household_register as $k => $v)
+                <img class="attchment" data-key="{{$k}}" data-name="household_register" src="{{ $v->response->path }}" />
+            @endforeach
+        </td>
+    </tr>
+    <tr style="height:47px;page-break-inside:avoid">
+        <td valign="center" rowspan="{{ count($info->family)+1 }}">
+            家庭成员及其主要社会关系
+        </td>
+        <td valign="center" style="width:200px;">
+            <p style=";text-align:center">
+                <span style=";font-family:宋体;font-size:14px">称谓</span>
+            </p>
+        </td>
+        <td width="200" valign="center" style="width:200px;">
+            <p style=";text-align:center">
+                <span style=";font-family:宋体;font-size:14px">姓名</span>
+            </p>
+        </td>
+        <td width="87" valign="center" style="width:600px;">
+            <p style=";text-align:center">
+                <span style=";font-family:宋体;font-size:14px">证件信息</span>
+            </p>
+        </td>
+    </tr>
+    @foreach($info->family as $k => $v)
+        <tr style="height:52px;page-break-inside:avoid" >
+            <td valign="center">
+                {{$v->relation}}
+            </td>
+            <td valign="center">
+                {{$v->realname}}
+            </td>
+            <td valign="center">
+                {{$v->idcard}}
+            </td>
+        </tr>
+    @endforeach
+</table>
+<table cellspacing="0" width="100%" class="table_form">
+    <tr style="height:60px;page-break-inside:avoid">
+        <td colspan="12">
+            <h1>工作情况</h1>
+        </td>
+    </tr>
+    <tr style="height:52px;page-break-inside:avoid">
+        <td valign="center" style="width:200px;">
+            人才工作单位
+        </td>
+        <td valign="center" style="width:1000px;">
+            @foreach($info->work_prove as $k => $v)
+                <img class="attchment" data-key="{{$k}}" data-name="work_prove" src="{{ $v->response->path }}" />
+            @endforeach
+        </td>
+    </tr>
+    <tr style="height:52px;page-break-inside:avoid">
+        <td valign="center">所属街道</td>
+        <td valign="center">
+            {{$info->street}}
+        </td>
+    </tr>
+</table>
+<table cellspacing="0" width="100%" class="table_form">
+    <tr style="height:60px;page-break-inside:avoid">
+        <td colspan='4'>
+            <h1>住房情况</h1>
+        </td>
+    </tr>
+    <tr style="height:52px;page-break-inside:avoid">
+        <td valign="center">
+            <span class="require">*</span>家庭成员在晋江市行政区域内住房情况
+        </td>
+        <td valign="center">
+            {{$info->house_condition}}
+        </td>
+        <td valign="center">
+            <span class="require">*</span>在晋享受政策性住房或相关优惠情况
+        </td>
+        <td valign="center">
+            {{$info->house_policy}}
+        </td>
+    </tr>
+</table>
+
+<script>
+    let photos = {!!json_encode($photos)!!};
+    $('.attchment').click(function(){
+        let key = $(this).data('key');
+        let name = $(this).data('name');
+        let photo = photos[name];
+        console.log(photo);
+        photo.start = key;
+        layer.photos({
+            photos: photo,
+            tab: function () {
+                num = 0;
+                $(".layui-layer-photos").append('<div class="icon" style="position:relative;width:100%;text-align:center;top:-133px;cursor:pointer;">\n' +
+                    '\t\t<img src="{{ theme_asset('statistics/js/layer/skin/default/turn_left.png') }}" style="width:30px;height30px;">\n' +
+                    '\t</div>');
+            }
+        });
+    });
+
+    $(document).on("click", ".icon img", function(e) {
+        num = (num + 90) % 360;
+        $("#layui-layer-photos").css('transform', 'rotate(' + num + 'deg)');
+
+        //$(".layui-layer-phimg img").css('transform','rotate('+num+'deg)');此处只能旋转图片
+    });
+
+
+    $(document).on("mousewheel DOMMouseScroll", ".layui-layer-phimg img", function(e) {
+        var delta = (e.originalEvent.wheelDelta && (e.originalEvent.wheelDelta > 0 ? 1 : -1)) || // chrome & ie
+            (e.originalEvent.detail && (e.originalEvent.detail > 0 ? -1 : 1)); // firefox
+        var imagep = $(".layui-layer-phimg").parent().parent();
+        var image = $(".layui-layer-phimg").parent();
+        var h = image.height();
+        var w = image.width();
+        if(delta > 0) {
+
+            h = h * 1.05;
+            w = w * 1.05;
+
+        } else if(delta < 0) {
+            if(h > 100) {
+                h = h * 0.95;
+                w = w * 0.95;
+            }
+        }
+        imagep.css("top", (window.innerHeight - h) / 2);
+        imagep.css("left", (window.innerWidth - w) / 2);
+        image.height(h);
+        image.width(w);
+        imagep.height(h);
+        imagep.width(w);
+
+    });
+
+</script>

+ 38 - 0
resources/views/admin/content/buy_house.blade.php

@@ -0,0 +1,38 @@
+{!! $grid->render() !!}
+<style>
+    p#vtip { display: none; position: absolute; padding: 10px; left: 5px; font-size: 0.8em; background-color: white; border: 1px solid #a6c9e2; -moz-border-radius: 5px; -webkit-border-radius: 5px; z-index: 9999 }
+    p#vtip #vtipArrow { position: absolute; top: -10px; left: 5px }
+</style>
+<script>
+    this.vtip = function() {
+        this.xOffset = -10; // x distance from mouse
+        this.yOffset = 15; // y distance from mouse
+        $(".vtip").unbind().hover(
+            function(e) {
+                this.t = $(this).attr("title");
+                this.title = '';
+                this.top = (e.pageY + yOffset);
+                this.left = (e.pageX + xOffset);
+                $('body').css("cursor","help");
+                $('p#vtip').width()>450?$('p#vtip').width(450):'';
+                $('body').append( '<p id="vtip">' + this.t + '</p>' );
+                $('p#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn(0);
+            },
+            function() {
+                this.title = this.t;
+                $('body').css("cursor","");
+                $("p#vtip").fadeOut("slow").remove();
+            }
+        ).mousemove(
+            function(e) {
+                this.top = (e.pageY + yOffset);
+                this.left = (e.pageX + xOffset);
+                $("p#vtip").css("top", this.top+"px").css("left", this.left+"px");
+            }
+        );
+
+    };
+    $(document).ready(function() {
+        vtip();
+    });
+</script>

+ 131 - 0
resources/views/admin/content/buy_house_rs.blade.php

@@ -0,0 +1,131 @@
+{!! $grid->render() !!}
+<style>
+    p#vtip { display: none; position: absolute; padding: 10px; left: 5px; font-size: 0.8em; background-color: white; border: 1px solid #a6c9e2; -moz-border-radius: 5px; -webkit-border-radius: 5px; z-index: 9999 }
+    p#vtip #vtipArrow { position: absolute; top: -10px; left: 5px }
+</style>
+<div class="modal fade" id="audit" tabindex="-1" role="dialog" aria-labelledby="ModalLabel">
+    <div class="modal-dialog" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
+                </button>
+                <h4 class="modal-title" id="myModalLabel12">申报审核</h4>
+            </div>
+            <div class="modal-body">
+                <div class="modal-body">
+                    <form method="POST" action="{{route('content.buy_house_rs.audit')}}" id="auditForm" class="form-horizontal" accept-charset="UTF-8" pjax-container="1" id="dialog-form-5cc19c85d0a5f">
+                        <div class="box-body fields-group">
+                            <div class="form-group  ">
+                                <label for="audit1" class="col-sm-2  control-label">审核状态</label>
+                                <div class="col-sm-8">
+                                    <label class="radio-inline">
+                                        <input type="radio" name="status" value="2" class="minimal audit1" checked>
+                                        &nbsp;审核通过&nbsp;&nbsp;
+                                    </label>
+                                    <label class="radio-inline">
+                                        <input type="radio" name="status" value="3" class="minimal audit1" >
+                                        &nbsp;审核不通过&nbsp;&nbsp;
+                                    </label>
+                                </div>
+                            </div>
+                            <div class="form-group  ">
+                                <label for="reason" class="col-sm-2  control-label">备注</label>
+                                <div class="col-sm-8">
+                                    <textarea name="reason" class="form-control reason" rows="5" placeholder="输入 备注"></textarea>
+                                </div>
+                            </div>
+                        </div>
+                        <input type="hidden" name="id" id="id" value="" />
+                        <input type="hidden" name="url" id="url" value="{{url()->full()}}" />
+                        <input type="hidden" name="_token" value="{{ csrf_token() }}">
+                    </form>
+                </div>
+                <div class="modal-footer">
+                    {{--<button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>取消</button>--}}
+                    <button type="button" id="dialog-submit-5cc19c85d0a5f" class="btn btn-primary" data-loading-text="提交中..."><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>确认</button>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<div class="modal fade" id="dialog" tabindex="-1" role="dialog" aria-labelledby="ModalLabel">
+    <div class="modal-dialog" role="document" style="width:1200px;">
+        <div class="modal-content">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
+                </button>
+                <h4 class="modal-title" id="myModalLabel1">业务</h4>
+            </div>
+            <div class="modal-body">
+
+                <div class="contentfade" style="height: 700px;overflow: auto;">
+
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+    this.vtip = function() {
+        this.xOffset = -10; // x distance from mouse
+        this.yOffset = 15; // y distance from mouse
+        $(".vtip").unbind().hover(
+            function(e) {
+                this.t = $(this).attr("title");
+                this.title = '';
+                this.top = (e.pageY + yOffset);
+                this.left = (e.pageX + xOffset);
+                $('body').css("cursor","help");
+                $('p#vtip').width()>450?$('p#vtip').width(450):'';
+                $('body').append( '<p id="vtip">' + this.t + '</p>' );
+                $('p#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn(0);
+            },
+            function() {
+                this.title = this.t;
+                $('body').css("cursor","");
+                $("p#vtip").fadeOut("slow").remove();
+            }
+        ).mousemove(
+            function(e) {
+                this.top = (e.pageY + yOffset);
+                this.left = (e.pageX + xOffset);
+                $("p#vtip").css("top", this.top+"px").css("left", this.left+"px");
+            }
+        );
+
+    };
+    $(document).ready(function() {
+        vtip();
+    });
+    $(document).off("click",'.applyaudit').on('click','.applyaudit',function () {
+        $('#id').val($(this).data('code'));
+        $('#audit').addClass('in');
+        $('#audit').css('display', 'block');
+        $(' #audit .contentfade').html('');
+    });
+    $(document).off("click","#audit .btn-primary").on('click',"#audit .btn-primary",function () {
+        $('#auditForm').submit();
+    });
+    $(".close").off().on('click', function () {
+        $(this).closest(".modal").removeClass('in');
+        $(this).closest(".modal").hide();
+    });
+
+    $('.detail').on('click', function () {
+        $("#myModalLabel1").html('详情');
+        var id = $(this).attr('id');
+        $('#dialog').addClass('in');
+        $('#dialog').css('display', 'block');
+        $('.contentfade').html('');
+        $.ajax({
+            url: "{{admin_base_path('/content/buy_house_rs/detail')}}",
+            data:{'id':id,'_token':'{{csrf_token()}}'},
+            // dataType:'json',
+            success:function (res) {
+                console.log(res);
+                $('.contentfade').html(res.data);
+            },
+        })
+    });
+</script>

+ 2 - 0
routes/web.php

@@ -731,6 +731,8 @@ Route::group([
     $router->any('buyhouse/list', "Web\Content\BuyhouseController@list")->name('buyhouse.list');
     $router->post('buyhouse/list_post', "Web\Content\BuyhouseController@listPost")->name('buyhouse.listPost');
     $router->post('buyhouse/upload', 'Web\Content\BuyhouseController@upload')->name('buyhouse.upload');
+    $router->get('buyhouse/news', 'Web\Content\BuyhouseController@news')->name('buyhouse.news');
+    $router->get('buyhouse/house', 'Web\Content\BuyhouseController@house')->name('buyhouse.house');
 });
 
 /*硬件模块*/