瀏覽代碼

Merge branch 'master' of ssh://git.9026.com:2212/swdz-WangHaijun/BaoMa

# Conflicts:
#	app/Admin/Actions/Community/Docter/Chat.php
#	app/Community/routes.php
#	composer.json
#	composer.lock
Swdz-WangHaiJun 4 年之前
父節點
當前提交
0ca2f9d1b7
共有 40 個文件被更改,包括 1811 次插入180 次删除
  1. 11 11
      app/Admin/Actions/Community/Docter/Pass.php
  2. 112 0
      app/Admin/Actions/Vaccines/ImportAction.php
  3. 21 0
      app/Admin/Actions/backstage/Pass.php
  4. 19 0
      app/Admin/Actions/backstage/Refuse.php
  5. 19 0
      app/Admin/Actions/backstage/Revoke.php
  6. 18 0
      app/Admin/Actions/backstage/User/BalanceLog.php
  7. 20 0
      app/Admin/Actions/backstage/User/BlackList.php
  8. 19 0
      app/Admin/Actions/backstage/User/archives.php
  9. 20 0
      app/Admin/Actions/backstage/User/service.php
  10. 101 0
      app/Admin/Controllers/ApproveController.php
  11. 13 2
      app/Admin/Controllers/ArticleController.php
  12. 105 0
      app/Admin/Controllers/UserBalanceLogController.php
  13. 100 0
      app/Admin/Controllers/UserListController.php
  14. 105 0
      app/Admin/Controllers/UserPatientsController.php
  15. 127 0
      app/Admin/Controllers/UserServiceController.php
  16. 130 0
      app/Admin/Controllers/VaccinesController.php
  17. 7 0
      app/Admin/routes.php
  18. 0 1
      app/Community/routes.php
  19. 4 2
      app/Helpers/functions.php
  20. 34 0
      app/Imports/Vaccines/ImportMember.php
  21. 7 1
      app/Models/Order.php
  22. 7 0
      app/Models/OrderPack.php
  23. 4 1
      app/Models/Patient.php
  24. 0 9
      app/Models/ServiceApply.php
  25. 10 0
      app/Models/User.php
  26. 3 1
      app/Models/UserBalanceLog.php
  27. 17 0
      app/Models/Vaccines.php
  28. 2 1
      composer.json
  29. 579 0
      composer.lock
  30. 1 1
      config/admin.php
  31. 36 0
      database/migrations/2014_10_12_000000_create_users_table.php
  32. 32 0
      database/migrations/2014_10_12_100000_create_password_resets_table.php
  33. 56 0
      database/migrations/2016_01_04_173148_create_admin_tables.php
  34. 35 0
      database/migrations/2019_08_19_000000_create_failed_jobs_table.php
  35. 0 40
      database/migrations/2020_11_17_033808_alert_cmds_user.php
  36. 0 37
      database/migrations/2020_11_19_064648_bm_banner.php
  37. 0 37
      database/migrations/2020_11_19_094540_bm_servebanners.php
  38. 0 35
      database/migrations/2020_11_24_065951_add_table_bm_service_apply.php
  39. 36 0
      database/migrations/2020_11_25_095040_add_field.php
  40. 1 1
      routes/web.php

+ 11 - 11
app/Admin/Actions/Community/Docter/Pass.php

xqd
@@ -22,17 +22,17 @@ class Pass extends RowAction
         try{
             $DocOrg = new DocterOrganization();
             $DocOrg->where('id',$id)->update(['state'=>1]);
-//            $count = $DocOrg->where('state','!=',1)->where('docter_id',$docter_id)->count();
-//            if($count == 0){
-//                Docter::where(['id'=>$docter_id])->update(['is_then'=>1]);
-//                $user_name = $this->randomkeys(8);
-//                $data['username'] = $user_name;
-//                $data['name'] = $name;
-//                $data['password'] = bcrypt('123456');
-//                $data['org_id'] = $org_id;
-//                $data['docter_id'] = $docter_id;
-//                CdmsUsers::insert($data);
-//            }
+            $count = $DocOrg->where('state','!=',1)->where('docter_id',$docter_id)->count();
+            if($count == 0){
+                Docter::where(['id'=>$docter_id])->update(['is_then'=>1]);
+                $user_name = $this->randomkeys(8);
+                $data['username'] = $user_name;
+                $data['name'] = $name;
+                $data['password'] = bcrypt('123456');
+                $data['org_id'] = $org_id;
+                $data['docter_id'] = $docter_id;
+                CdmsUsers::insert($data);
+            }
 
         } catch (\Exception $e){
             return $this->response()->error('更新失败!');

+ 112 - 0
app/Admin/Actions/Vaccines/ImportAction.php

xqd
@@ -0,0 +1,112 @@
+<?php
+
+namespace App\Admin\Actions\Vaccines;
+
+use Encore\Admin\Actions\Action;
+use Illuminate\Http\Request;
+use App\Imports\Vaccines\ImportMember;
+use Encore\Admin\Admin;
+use Maatwebsite\Excel\Facades\Excel;
+
+class ImportAction extends Action
+{
+    protected $selector = '.import-action';
+
+    public function handle(Request $request)
+    {
+        try{
+            // $request ...
+            $file = $request-> file('file');
+
+            Excel::import(new ImportMember(),$file);
+
+            return $this->response()->success('数据导入成功')->refresh();
+        }catch (\Exception $e){
+            return $this->response()->error($e -> getMessage());
+        }
+    }
+
+    public function html()
+    {
+        return <<<HTML
+        <a class="btn btn-sm btn-default import-action">导入</a>
+HTML;
+    }
+
+
+    //表单
+    public function form()
+    {
+        $this
+            ->file('file', '请选择文件')
+            ->options(['showPreview' => false,
+                'allowedFileExtensions'=>['xlsx','xls','csv'],
+                'showUpload'=>true
+            ]);
+    }
+
+    //上传等待
+    public function handleActionPromise()
+    {
+        $resolve = <<<SCRIPT
+var actionResolverss = function (data) {
+            $('.modal-footer').show()
+            $('.tips').remove()
+            var response = data[0];
+            var target   = data[1];
+
+            if (typeof response !== 'object') {
+                return $.admin.swal({type: 'error', title: 'Oops!'});
+            }
+
+            var then = function (then) {
+                if (then.action == 'refresh') {
+                    $.admin.reload();
+                }
+
+                if (then.action == 'download') {
+                    window.open(then.value, '_blank');
+                }
+
+                if (then.action == 'redirect') {
+                    $.admin.redirect(then.value);
+                }
+            };
+
+            if (typeof response.html === 'string') {
+                target.html(response.html);
+            }
+
+            if (typeof response.swal === 'object') {
+                $.admin.swal(response.swal);
+            }
+
+            if (typeof response.toastr === 'object') {
+                $.admin.toastr[response.toastr.type](response.toastr.content, '', response.toastr.options);
+            }
+
+            if (response.then) {
+              then(response.then);
+            }
+        };
+
+        var actionCatcherss = function (request) {
+            $('.modal-footer').show()
+            $('.tips').remove()
+
+            if (request && typeof request.responseJSON === 'object') {
+                $.admin.toastr.error(request.responseJSON.message, '', {positionClass:"toast-bottom-center", timeOut: 10000}).css("width","500px")
+            }
+        };
+SCRIPT;
+
+        Admin::script($resolve);
+
+        return <<<SCRIPT
+         $('.modal-footer').hide()
+         let html = `<div class='tips' style='color: #ff3249;font-size: 18px;'>导入时间取决于数据量,请耐心等待结果不要关闭窗口!<img src="data:image/gif;base64,R0lGODlhEAAQAPQAAP///1VVVfr6+np6eqysrFhYWG5ubuPj48TExGNjY6Ojo5iYmOzs7Lq6utjY2ISEhI6OjgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAAFUCAgjmRpnqUwFGwhKoRgqq2YFMaRGjWA8AbZiIBbjQQ8AmmFUJEQhQGJhaKOrCksgEla+KIkYvC6SJKQOISoNSYdeIk1ayA8ExTyeR3F749CACH5BAkKAAAALAAAAAAQABAAAAVoICCKR9KMaCoaxeCoqEAkRX3AwMHWxQIIjJSAZWgUEgzBwCBAEQpMwIDwY1FHgwJCtOW2UDWYIDyqNVVkUbYr6CK+o2eUMKgWrqKhj0FrEM8jQQALPFA3MAc8CQSAMA5ZBjgqDQmHIyEAIfkECQoAAAAsAAAAABAAEAAABWAgII4j85Ao2hRIKgrEUBQJLaSHMe8zgQo6Q8sxS7RIhILhBkgumCTZsXkACBC+0cwF2GoLLoFXREDcDlkAojBICRaFLDCOQtQKjmsQSubtDFU/NXcDBHwkaw1cKQ8MiyEAIfkECQoAAAAsAAAAABAAEAAABVIgII5kaZ6AIJQCMRTFQKiDQx4GrBfGa4uCnAEhQuRgPwCBtwK+kCNFgjh6QlFYgGO7baJ2CxIioSDpwqNggWCGDVVGphly3BkOpXDrKfNm/4AhACH5BAkKAAAALAAAAAAQABAAAAVgICCOZGmeqEAMRTEQwskYbV0Yx7kYSIzQhtgoBxCKBDQCIOcoLBimRiFhSABYU5gIgW01pLUBYkRItAYAqrlhYiwKjiWAcDMWY8QjsCf4DewiBzQ2N1AmKlgvgCiMjSQhACH5BAkKAAAALAAAAAAQABAAAAVfICCOZGmeqEgUxUAIpkA0AMKyxkEiSZEIsJqhYAg+boUFSTAkiBiNHks3sg1ILAfBiS10gyqCg0UaFBCkwy3RYKiIYMAC+RAxiQgYsJdAjw5DN2gILzEEZgVcKYuMJiEAOwAAAAAAAAAAAA=="><\/div>`
+         $('.modal-header').append(html)
+process.then(actionResolverss).catch(actionCatcherss);
+SCRIPT;
+    }
+}

+ 21 - 0
app/Admin/Actions/backstage/Pass.php

xqd
@@ -0,0 +1,21 @@
+<?php
+
+namespace App\Admin\Actions\backstage;
+
+use App\Models\DocterOrganization;
+use Encore\Admin\Actions\RowAction;
+use Illuminate\Database\Eloquent\Model;
+
+class Pass extends RowAction
+{
+    public $name = '通过';
+
+    public function handle(Model $model)
+    {
+//         $model ...
+//        dd($model);
+        DocterOrganization::where('id',$model->id)->update(['state'=>2]);
+        return $this->response()->success('审核通过')->refresh();
+    }
+
+}

+ 19 - 0
app/Admin/Actions/backstage/Refuse.php

xqd
@@ -0,0 +1,19 @@
+<?php
+
+namespace App\Admin\Actions\backstage;
+use App\Models\DocterOrganization;
+use Encore\Admin\Actions\RowAction;
+use Illuminate\Database\Eloquent\Model;
+
+class Refuse extends RowAction
+{
+    public $name = '驳回';
+
+    public function handle(Model $model)
+    {
+        // $model ...
+        DocterOrganization::where('id',$model->id)->update(['state'=>3]);
+        return $this->response()->success('审核拒绝')->refresh();
+    }
+
+}

+ 19 - 0
app/Admin/Actions/backstage/Revoke.php

xqd
@@ -0,0 +1,19 @@
+<?php
+
+namespace App\Admin\Actions\backstage;
+use App\Models\DocterOrganization;
+use Encore\Admin\Actions\RowAction;
+use Illuminate\Database\Eloquent\Model;
+
+class Revoke extends RowAction
+{
+    public $name = '撤销';
+
+    public function handle(Model $model)
+    {
+        // $model ...
+        DocterOrganization::where('id',$model->id)->update(['state'=>0]);
+        return $this->response()->success('审核撤销')->refresh();
+    }
+
+}

+ 18 - 0
app/Admin/Actions/backstage/User/BalanceLog.php

xqd
@@ -0,0 +1,18 @@
+<?php
+
+namespace App\Admin\Actions\backstage\User;
+
+use Encore\Admin\Actions\RowAction;
+use Illuminate\Database\Eloquent\Model;
+
+class BalanceLog extends RowAction
+{
+    public $name = '余额明细';
+
+    public function handle(Model $model)
+    {
+        // $model ...
+        return $this->response()->success('跳转余额成功')->redirect('/admin/user_balance_logs?user_id='.$this->row->id.'');
+    }
+
+}

+ 20 - 0
app/Admin/Actions/backstage/User/BlackList.php

xqd
@@ -0,0 +1,20 @@
+<?php
+
+namespace App\Admin\Actions\backstage\User;
+
+use App\Models\User;
+use Encore\Admin\Actions\RowAction;
+use Illuminate\Database\Eloquent\Model;
+
+class BlackList extends RowAction
+{
+    public $name = '拉黑';
+
+    public function handle(Model $model)
+    {
+        // $model ...
+        User::where('id',$model->id)->update(['status'=>0]);
+        return $this->response()->success('拉黑成功.')->refresh();
+    }
+
+}

+ 19 - 0
app/Admin/Actions/backstage/User/archives.php

xqd
@@ -0,0 +1,19 @@
+<?php
+
+namespace App\Admin\Actions\backstage\User;
+
+use App\Models\Patient;
+use Encore\Admin\Actions\RowAction;
+use Illuminate\Database\Eloquent\Model;
+
+class archives extends RowAction
+{
+    public $name = '档案';
+
+    public function handle(Model $model)
+    {
+        // $model ...
+        return $this->response()->success('跳转档案库成功')->redirect('/admin/user_patients?user_id='.$this->row->id.'');
+    }
+
+}

+ 20 - 0
app/Admin/Actions/backstage/User/service.php

xqd
@@ -0,0 +1,20 @@
+<?php
+
+namespace App\Admin\Actions\backstage\User;
+
+use Encore\Admin\Actions\RowAction;
+use Illuminate\Database\Eloquent\Model;
+
+class service extends RowAction
+{
+    public $name = '服务包-保单';
+
+    public function handle(Model $model)
+    {
+        // $model ...
+
+        return $this->response()->success('跳转订单库成功')->redirect('/admin/user_orders?user_id='.$this->row->id.'&product_type=6');
+
+    }
+
+}

+ 101 - 0
app/Admin/Controllers/ApproveController.php

xqd
@@ -0,0 +1,101 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Admin\Actions\backstage\Pass;
+use App\Admin\Actions\backstage\Refuse;
+use App\Admin\Actions\backstage\Revoke;
+use App\Models\Docter;
+use App\Models\DocterOrganization;
+use App\Models\Office;
+use Encore\Admin\Controllers\AdminController;
+use Encore\Admin\Form;
+use Encore\Admin\Grid;
+use Encore\Admin\Show;
+
+class ApproveController extends AdminController
+{
+    /**
+     * Title for current resource.
+     *
+     * @var string
+     */
+    protected $title = '认证列表';
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        $grid = new Grid(new DocterOrganization());
+        $grid ->model()->where('state','>=','1');
+        $grid->column('id', __('Id'));
+        $grid->column('docter.id', __('医生ID'));
+        $grid->column('docter.name', __('名字'));
+        $grid->column('docter.sex', __('性别'))->using([0=>'未知',1=>'男',2=>'女']);
+        $grid->column('docter.card_id', __('身份证'));
+        $grid->column('organization.name', __('机构'));
+        $grid->column('office.name', __('科室'));
+        $grid->column('qualification.name', __('医生资质'));
+        $grid->column('state', __('状态'))->using([1=>'待审核',2=>'已认证',3=>'已驳回']);
+
+        $grid->actions(function ($actions) {
+            $actions->add(new Pass());
+            $actions->add(new Refuse());
+            $actions->add(new Revoke());
+        });
+        return $grid;
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     * @return Show
+     */
+    protected function detail($id)
+    {
+
+        $show = new Show(DocterOrganization::findOrFail($id));
+        $show->field('id', __('Id'));
+        $show->field('docter.id', __('医生ID'));
+        $show->field('docter.name', __('名字'));
+        $show->field('docter.sex', __('性别'))->using([0=>'未知',1=>'男',2=>'女']);
+        $show->field('docter.card_id', __('身份证'));
+        $show->field('organization.name', __('机构'));
+        $show->field('office.name', __('科室'));
+        $show->field('qualification.name', __('医生资质'));
+//        $show->field('docter.card_photo', __('身份证正反面'))->as(function ($id){
+////            dd($id);
+//            $imgs = explode(',',$id);
+//            $html = '';
+//            foreach ($imgs as $val){
+//                $html .='img src="'.$val.'"';
+//            }
+//            return "<{$html}>";
+////            return json_decode($id,true);
+//        });
+        $show->field('docter.card_photo', __('身份证正反面'))->image();
+        return $show;
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        $form = new Form(new DocterOrganization());
+
+        $form->number('docter_id', __('Docter id'));
+        $form->number('organization_id', __('Organization id'));
+        $form->number('offices_id', __('Offices id'));
+        $form->number('qualifications_id', __('Qualifications id'));
+        $form->number('state', __('State'));
+
+        return $form;
+    }
+}

+ 13 - 2
app/Admin/Controllers/ArticleController.php

xqd xqd
@@ -27,12 +27,23 @@ class ArticleController extends AdminController
         $grid = new Grid(new Article());
 
         $grid->column('id', __('Id'));
-        $grid->column('type', __('分类'));
+        $grid->column('type', __('分类'))->using([1=>'没',2=>'有',3=>'分',4=>'类']);
         $grid->column('title', __('标题'))->limit(10,'...')->width(100);
         $grid->column('content', __('内容'))->limit(20,'...')->width(200);
         $grid->column('banner_url', __('图片'))->image('',50,50);
         $grid->column('created_at', __('创建时间'));
         $grid->column('updated_at', __('更新时间'));
+        $grid->filter(function($filter){
+
+            // Remove the default id filter
+            $filter->disableIdFilter();
+
+            // Add a column filter
+            $type = [''=>'全部'];
+            $type = array_merge($type,Article::$_post_type);
+            $filter->equal('type', '类别')->select(Article::$_post_type);
+
+        });
 
         return $grid;
     }
@@ -67,7 +78,7 @@ class ArticleController extends AdminController
     {
         $form = new Form(new Article());
 
-        $form->select('type', __('分类'))->options(Article::$_post_type)->default(1);
+        $form->select('type', __('分类'))->options(Article::$_post_type)->default('1');
         $form->text('title', __('标题'))->rules('required|min:3|max:255',['required'=>'请填写标题','min'=>'标题字符不能少于3个','max'=>'标题长度过长']);
         $form->textarea('content', __('内容'))->rules('required|min:3',['required'=>'请填写标题','min'=>'标题字符不能少于3个']);
         $form->image('banner_url', __('图片'))->rules('required' ,['required'=>'请选择图片!']);

+ 105 - 0
app/Admin/Controllers/UserBalanceLogController.php

xqd
@@ -0,0 +1,105 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\UserBalanceLog;
+use Encore\Admin\Controllers\AdminController;
+use Encore\Admin\Form;
+use Encore\Admin\Grid;
+use Encore\Admin\Show;
+
+class UserBalanceLogController extends AdminController
+{
+    /**
+     * Title for current resource.
+     *
+     * @var string
+     */
+    protected $title = '余额明细';
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        $grid = new Grid(new UserBalanceLog());
+        //根据id筛选数据
+        $uesr_id = \request('user_id');
+        $grid->filter(function ($filter){
+            $filter->disableIdFilter();
+            $filter->equal('user_id','用户id');
+        });
+        //关闭全部的操作
+        $grid->disableActions();
+
+        $grid->column('id', __('Id'));
+        $grid->column('user_id', __('用户ID'));
+        $grid->column('user.nickname', __('用户名称'));
+        $grid->column('admin_user_id', __('后台用户ID'));
+        $grid->column('type', __('类型'))
+            ->using([1=>'订单消费',2=>'用户充值',3=>'后台赠送']);
+        $grid->column('relation_id', __('订单id'));
+        $grid->column('before_balance', __('变化前的余额'))->display(function ($price){
+            return $price/100;
+        });
+        $grid->column('change_balance', __('改变的余额'))->display(function ($price){
+            return $price/100;
+        });
+        $grid->column('after_balance', __('变化后的余额'))->display(function ($price){
+            return $price/100;
+        });
+        $grid->column('remark', __('备注'));
+        $grid->column('created_at', __('创建时间'));
+        $grid->column('updated_at', __('更新时间'));
+
+        return $grid;
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        $show = new Show(UserBalanceLog::findOrFail($id));
+
+        $show->field('id', __('Id'));
+        $show->field('user_id', __('User id'));
+        $show->field('admin_user_id', __('Admin user id'));
+        $show->field('type', __('Type'));
+        $show->field('relation_id', __('Relation id'));
+        $show->field('before_balance', __('Before balance'));
+        $show->field('change_balance', __('Change balance'));
+        $show->field('after_balance', __('After balance'));
+        $show->field('remark', __('Remark'));
+        $show->field('created_at', __('Created at'));
+        $show->field('updated_at', __('Updated at'));
+
+        return $show;
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        $form = new Form(new UserBalanceLog());
+
+        $form->number('user_id', __('User id'));
+        $form->number('admin_user_id', __('Admin user id'));
+        $form->switch('type', __('Type'));
+        $form->number('relation_id', __('Relation id'));
+        $form->number('before_balance', __('Before balance'));
+        $form->number('change_balance', __('Change balance'));
+        $form->number('after_balance', __('After balance'));
+        $form->text('remark', __('Remark'));
+
+        return $form;
+    }
+}

+ 100 - 0
app/Admin/Controllers/UserListController.php

xqd
@@ -0,0 +1,100 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Admin\Actions\backstage\User\archives;
+use App\Admin\Actions\backstage\User\BalanceLog;
+use App\Admin\Actions\backstage\User\BlackList;
+use App\Admin\Actions\backstage\User\service;
+use App\Models\User;
+use Encore\Admin\Controllers\AdminController;
+use Encore\Admin\Form;
+use Encore\Admin\Grid;
+use Encore\Admin\Show;
+
+class UserListController extends AdminController
+{
+    /**
+     * Title for current resource.
+     *
+     * @var string
+     */
+    protected $title = '用户列表';
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        $grid = new Grid(new User());
+        $grid->actions(function ($actions) {
+            // 去掉删除
+            $actions->disableDelete();
+            // 去掉编辑
+            $actions->disableEdit();
+            // 去掉查看
+            $actions->disableView();
+            $actions->add(new archives());
+            $actions->add(new service());
+            $actions->add(new BalanceLog());
+            $actions->add(new BlackList());
+        });
+        //筛选
+        $grid->filter(function ($filter){
+            $filter->disableIdFilter();
+            $filter->equal('phone','手机')->mobile()->placeholder("请输入手机");
+            $filter->equal('phone','订单号')->placeholder("请输入订单号");
+            $filter->like('nickname','昵称');
+            $filter->equal('status','用户状态')->radio([
+                ''   => '不限',
+                0    => '黑名单',
+                1    => '正常',
+            ]);
+            $filter->equal('is_pack','用户状态')->radio([
+                ''   => '全部用户',
+                0    => '普通用户',
+                1    => '服务包用户',
+            ]);
+        });
+            $grid ->model()->where('status','>=','0');
+            $grid->column('id', __('用户id'))->sortable();
+            $grid->column('nickname', __('用户名'));
+            $grid->column('sex', __('性别'))->using([0=>'未知',1=>'男',2=>'女']);
+            $grid->column('age', __('年龄'));
+            $grid->column('status', __('状态'))->using([0=>'黑名单',1=>'正常',]);
+            $grid->column('is_pack', __('用户身份'))->using([0=>'普通用户',1=>'付费用户']);
+            $grid->column('balance', __('当前余额'))->display(function ($price){
+                return $price/100;
+            });
+            $grid->column('created_at', __('注册时间'));
+            $grid->column('last_login_time', __('最后登录时间'))->display(function ($time){
+                return date("Y-m-d H:i",$time);
+            });
+        return $grid;
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        $show = new Show(User::findOrFail($id));
+        return $show;
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        $form = new Form(new User());
+        return $form;
+    }
+}

+ 105 - 0
app/Admin/Controllers/UserPatientsController.php

xqd
@@ -0,0 +1,105 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\Patient;
+use Encore\Admin\Controllers\AdminController;
+use Illuminate\Http\Request;
+use Encore\Admin\Form;
+use Encore\Admin\Grid;
+use Encore\Admin\Show;
+
+class UserPatientsController extends AdminController
+{
+    /**
+     * Title for current resource.
+     *
+     * @var string
+     */
+    protected $title = '档案';
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        $grid = new Grid(new Patient());
+        $uesr_id = \request('user_id');
+        $grid->filter(function ($filter){
+            $filter->disableIdFilter();
+            $filter->equal('user_id','用户id');
+        });
+        $grid->actions(function ($actions) {
+            // 去掉删除
+            $actions->disableDelete();
+            // 去掉编辑
+            $actions->disableEdit();
+        });
+        $grid->column('id', __('档案id'));
+        $grid->column('user_id', __('用户id'));
+        $grid->column('name', __('姓名'));
+        $grid->column('sex', __('性别'))->using([0=>'未知',1=>'男',2=>'女',]);
+        $grid->column('avatar', __('头像'))->image("",100,100);
+        $grid->column('age', __('年龄'));
+        $grid->column('email', __('邮箱'));
+        $grid->column('phone', __('联系电话'));
+        $grid->column('address', __('家庭住址'))->limit(20,'...');
+        $grid->column('guardian_name', __('监护人姓名'));
+        $grid->column('card_type', __('证件类型'))->using([1=>'身份证',2=>'护照']);
+        $grid->column('card_number', __('证件号'));
+        $grid->column('social_card_number', __('社保卡号'));
+        $grid->column('created_at', __('创建时间'));
+        $grid->column('updated_at', __('更新时间'));
+
+        return $grid;
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        $show = new Show(Patient::findOrFail($id));
+
+        $show->field('id', __('档案id'));
+        $show->field('user_id', __('用户id'));
+        $show->field('name', __('姓名'));
+        $show->field('sex', __('性别'))->using([0=>'未知',1=>'男',2=>'女',]);
+        $show->field('avatar', __('头像'))->image();
+        $show->field('card_img_url', __('身份证正面照片'))->image();
+        $show->field('card_back_img_url', __('身份证背面照片'))->image();
+        $show->field('birthday', __('生日'));
+        $show->field('age', __('年龄'));
+        $show->field('email', __('邮箱'));
+        $show->field('phone', __('联系电话'));
+        $show->field('address', __('家庭住址'));
+        $show->field('guardian_name', __('监护人姓名'));
+        $show->field('relationship_type', __('与就诊人关系类型'))
+            ->using([1=>'父亲',2=>'母亲',3=>'祖父',4=>'祖母',5=>'外祖父',6=>'外祖母',7=>'叔侄',8=>'其他']);
+        $show->field('info', __('就诊信息'));
+        $show->field('card_type', __('证件类型'))->using([1=>'身份证',2=>'护照']);
+        $show->field('card_number', __('证件号'));
+        $show->field('social_card_number', __('社保卡号'));
+        $show->field('born_hospital', __('出生医院'));
+        $show->field('created_at', __('创建时间'));
+        $show->field('updated_at', __('更新时间'));
+
+        return $show;
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        $form = new Form(new Patient());
+        return $form;
+    }
+}

+ 127 - 0
app/Admin/Controllers/UserServiceController.php

xqd
@@ -0,0 +1,127 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\Order;
+use App\Models\OrderPack;
+use Encore\Admin\Controllers\AdminController;
+use Encore\Admin\Form;
+use Encore\Admin\Grid;
+use Encore\Admin\Show;
+
+class UserServiceController extends AdminController
+{
+    /**
+     * Title for current resource.
+     *
+     * @var string
+     */
+    protected $title = '服务包-保单';
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        $grid = new Grid(new Order());
+        $product_type = 6;
+        $uesr_id = \request('user_id');
+        $grid->filter(function ($filter){
+            $filter->disableIdFilter();
+            $filter->equal('user_id','用户id');
+            $filter->equal('product_type','订单类型');
+        });
+        $grid->actions(function ($actions) {
+
+            // 去掉删除
+            $actions->disableDelete();
+
+            // 去掉编辑
+            $actions->disableEdit();
+        });
+
+        $grid->column('orderPack.id', __('Id'));
+        $grid->column('orderPack.order_id', __('订单id'));
+        $grid->column('orderPack.service_pack_id', __('服务包id'));
+        $grid->column('orderPack.pack_name', __('服务包名称'));
+        $grid->column('orderPack.pack_intro', __('服务包简介'));
+        $grid->column('orderPack.pack_price', __('服务包价格'))->display(function ($price){
+            return $price/100;
+        });
+        $grid->column('orderPack.insurance_policy', __('保单名称'));
+        $grid->column('orderPack.insurance_img_url', __('	保单图片链接'));
+        $grid->column('orderPack.team_id', __('医生团队ID'));
+
+        $grid->column('orderPack.effective_days', __('有效天数'));
+        $grid->column('orderPack.start_time', __('开始时间'))->display(function ($start_time){
+            return date("Y-m-d H:i",$start_time);
+        });
+        $grid->column('orderPack.end_time', __('结束时间'))->display(function ($end_time){
+            return date("Y-m-d H:i",$end_time);
+        });
+        $grid->column('orderPack.created_at', __('创建时间'));
+        $grid->column('orderPack.updated_at', __('更新时间'));
+        return $grid;
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        $show = new Show(Order::findOrFail($id));
+
+        $show->field('orderPack.id', __('Id'));
+        $show->field('orderPack.order_id', __('订单ID'));
+        $show->field('orderPack.service_pack_id', __('服务包ID'));
+        $show->field('orderPack.pack_name', __('服务包名称'));
+        $show->field('orderPack.pack_intro', __('服务包简介'));
+        $show->field('orderPack.pack_price', __('服务包价格'))->as(function ($price){
+            return $price/100;
+        });
+        $show->field('orderPack.insurance_policy', __('保单名称'));
+        $show->field('orderPack.insurance_img_url', __('保单图片链接'));
+        $show->field('orderPack.team_id', __('医生团队ID'));
+        $show->field('orderPack.phone_minutes', __('	电话分钟数'));
+        $show->field('orderPack.chat_num', __('图文咨询次数'));
+        $show->field('orderPack.appoint_num', __('门诊预约次数'));
+        $show->field('orderPack.vaccine_limit_amount', __('疫苗总金额限制'))->as(function ($price){
+            return $price/100;
+        });
+        $show->field('orderPack.nurses_limit_amount', __('儿保总金额限制'))->as(function ($price){
+            return $price/100;
+        });
+        $show->field('orderPack.effective_days', __('	有效天数'));
+        $show->field('orderPack.start_time', __('开始时间'))->as(function ($start_time){
+            return date("Y-m-d H:i",$start_time);
+        });
+        $show->field('orderPack.end_time', __('结束时间'))->as(function ($end_time){
+            return date("Y-m-d H:i",$end_time);
+        });
+        $show->field('orderPack.is_security', __('宝贝是否有医保'))
+            ->using([0=>'否',1=>'是']);
+        $show->field('orderPack.guardian_name', __('监护人姓名'));
+        $show->field('orderPack.relationship_type', __('与宝贝的关系'))
+            ->using([1=>'父亲',2=>'母亲',3=>'祖父',4=>'祖母',5=>'外祖父',6=>'外祖母',7=>'叔侄']);
+        $show->field('orderPack.created_at', __('创建时间'));
+        $show->field('orderPack.updated_at', __('更新时间'));
+
+        return $show;
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        $form = new Form(new Order());
+        return $form;
+    }
+}

+ 130 - 0
app/Admin/Controllers/VaccinesController.php

xqd
@@ -0,0 +1,130 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Models\Vaccines;
+use App\Admin\Actions\Vaccines\ImportAction;
+use Encore\Admin\Controllers\AdminController;
+use Encore\Admin\Form;
+use Encore\Admin\Grid;
+use Encore\Admin\Show;
+
+class VaccinesController extends AdminController
+{
+    /**
+     * Title for current resource.
+     *
+     * @var string
+     */
+    protected $title = 'Vaccines';
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        $grid = new Grid(new Vaccines());
+
+        $grid->column('id', __('Id'));
+        $grid->column('type', '类型')->using([1=>'Ⅰ类疫苗',2=>'Ⅱ类疫苗']);
+        $grid->column('name', __('名称'));
+        $grid->column('introduction','简介');
+        $grid->column('price', __('价钱'));
+        $grid->column('remark', __('备注'));
+        $grid->column('supplier', __('厂家'));
+        $states = [
+            'on'  => ['value' => 1, 'text' => '启用', 'color' => 'success'],
+            'off' => ['value' => 0, 'text' => '禁用', 'color' => 'danger'],
+        ];
+        $grid->column('states','状态')->switch($states);
+        $grid->column('created_at', __('创建时间'));
+        $grid->column('updated_at', __('更新时间'));
+
+        $grid->filter(function($filter){
+            /*
+                搜索:按关键字、ID搜索
+                筛选:类别筛选
+                导入、导出
+            */
+            // 在这里添加字段过滤器
+            $filter->column(1/2, function ($filter) {
+                $filter->equal('type', '类型')->select(Vaccines::$_post_type);
+            });
+
+        });
+
+        //按关键字查询
+        $grid->quickSearch(function ($model, $query) {
+            //$model->whereHas('Vaccines',function ($model) use ($query) {
+                $model->where('type', 'like', "%{$query}%")
+                    ->orWhere('name', 'like', "%{$query}%")
+                    ->orWhere('id',$query)
+                    ->orwhere('supplier','like',"%{$query}%")
+                    ->orwhere('remark','like',"{$query}");
+            //});
+        })->placeholder('请输入疫苗id/名称/厂家/备注');
+
+        $grid->export(function ($export) {
+            //文件名
+            $export->filename('测试');
+            //排除字段不用导出
+            $export->except(['created_at', 'updated_at']);
+            $export->originalValue(['states']);
+        });
+
+        $grid->tools(function (Grid\Tools $tools) {
+            $tools->append(new ImportAction());
+        });
+
+        return $grid;
+    }
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        $show = new Show(Vaccines::findOrFail($id));
+
+        $show->field('id', __('Id'));
+        $show->field('type', __('分类'))->using([1=>'Ⅰ类疫苗',2=>'Ⅱ类疫苗']);
+        $show->field('introduction','简介');
+        $show->field('price', __('价钱'));
+        $show->field('name', __('名称'));
+        $show->field('remark', __('备注'));
+        $show->field('supplier', __('厂家'));
+        $show->field('created_at', __('创建时间'));
+        $show->field('updated_at', __('更新时间'));
+
+        return $show;
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        $form = new Form(new Vaccines());
+
+        $form->select('type', __('分类'))->options(Vaccines::$_post_type)->default('1');
+        $form->text('name', __('名称'))->rules('required|min:3|max:255',['required'=>'请填写名称','min'=>'名称不能少于3个字符!','max'=>'名称长度过长!']);
+        $form->text('introduction','简介')->rules('required',['require'=>'请填写疫苗简介!' ]);
+        $form->currency('price', __('价格'))->symbol('分');
+        $form->text('remark', __('备注'))->rules('required',['required'=>'请填写备注!']);;
+        $form->text('supplier', __('厂家'))->rules('required',['required'=>'请填写厂家!']);
+        $states = [
+            'off' => ['value' => 0, 'text' => '禁用', 'color' => 'danger'],
+            'on'  => ['value' => 1, 'text' => '启用', 'color' => 'success'],
+        ];
+        $form->switch('states','状态')->states($states);
+
+        return $form;
+    }
+}

+ 7 - 0
app/Admin/routes.php

xqd
@@ -17,9 +17,16 @@ Route::group([
     $router->resource('/organizations', OrganizationController::class);
     $router->resource('/docters', DocterController::class);
     $router->resource('/qualifications', QualificationController::class);
+    $router->resource('/docters_approve', ApproveController::class);
     $router->resource('banners', BannerController::class);
     $router->resource('servebanners', ServebannerController::class);
     $router->resource('articles', ArticleController::class);
 
+    $router->resource('vaccines', VaccinesController::class);
+    $router->resource('docters_management', DoctorManagementController::class);
+    $router->resource('users', UserListController::class);
+    $router->resource('user_patients', UserPatientsController::class);
+    $router->resource('user_orders', UserServiceController::class);
+    $router->resource('user_balance_logs', UserBalanceLogController::class);
 });
 

+ 0 - 1
app/Community/routes.php

xqd
@@ -19,7 +19,6 @@ Route::get('send_notices', 'NoticeController@send');
 Route::resource('/docter_chats', DocterChatController::class);
 Route::get('/chats', 'DocterChatController@chats');
 
-
 //api
 Route::get('/api/getDocter', 'ApiController@getDocter');
 Route::put('/api/paitent_remark', 'ApiController@paitent_remark');

+ 4 - 2
app/Helpers/functions.php

xqd xqd
@@ -124,6 +124,10 @@ if (!function_exists('build_sn')) {
 if (!function_exists('birthday_to_age')){
     function birthday_to_age($birthday)
     {
+        if($birthday==null)
+        {
+            return "0岁";
+        }
         list($year, $month, $day) = explode("-", $birthday);
         $year_diff = (date("Y") - $year) > 0 ? date("Y") - $year.'岁':'';
         $month_diff = (date("m") - $month) > 0 ? date("m") - $month.'个月':'';
@@ -131,11 +135,9 @@ if (!function_exists('birthday_to_age')){
         if ($day_diff < 0 || $month_diff < 0) {
             $year_diff--;
         }
-
         return $year_diff.$month_diff.$day_diff ;
     }
 }
-
 //计算经纬度两点之间距离(返回为米)
 if (!function_exists('get_distance')) {
     function get_distance($lat1, $lng1, $lat2, $lng2)

+ 34 - 0
app/Imports/Vaccines/ImportMember.php

xqd
@@ -0,0 +1,34 @@
+<?php
+
+namespace App\Imports\Vaccines;
+
+use App\Models\Vaccines;
+use Maatwebsite\Excel\Concerns\ToModel;
+use Maatwebsite\Excel\Concerns\WithStartRow;
+use Maatwebsite\Excel\Facades\Excel;
+
+class ImportMember implements ToModel
+{
+    /**
+    * @param array $row
+    *
+    * @return \Illuminate\Database\Eloquent\Model|null
+    */
+    public function model(array $row)
+    {
+        return new Vaccines([
+            //
+            'type' => $row[1],
+            'name' => $row[2],
+            'introduction' => $row[3],
+            'price' => $row[4],
+            'remark' => $row[5],
+            'supplier' => $row[6],
+            'states' => $row[7]
+        ]);
+    }
+    public function startRow(): int
+    {
+        return 2;
+    }
+}

+ 7 - 1
app/Models/Order.php

xqd xqd xqd
@@ -38,7 +38,7 @@ class Order extends BaseModel
 
     public function orderPack()
     {
-        return $this->hasMany(OrderPack::class);
+        return $this->hasOne(OrderPack::class);
     }
 
     public function orderNurse()
@@ -61,6 +61,10 @@ class Order extends BaseModel
         return $this->belongsTo(Organization::class);
     }
 
+    public function user()
+    {
+        return $this->belongsTo(User::class);
+    }
     //支付完成的处理方法
     public static function payCompletedHandle($order_id)
     {
@@ -73,6 +77,8 @@ class Order extends BaseModel
         elseif ($order['product_type'] == 6) {
             $orderPack = OrderPack::select(['pack_name', 'end_time'])->where('order_id', $order_id)->first();
             UserMessage::saveMessage($order['user_id'], 5, $order_id, [$orderPack['pack_name'], date('Y-m-d', $orderPack['end_time'])]);
+            //更新用户为服务包用户
+            User::where('id', $order['user_id'])->update(['is_pack' => 1]);
         }
         elseif ($order['product_type'] == 7) {
             $user = User::select(['balance'])->where('id', $order['user_id'])->first();

+ 7 - 0
app/Models/OrderPack.php

xqd
@@ -14,4 +14,11 @@ class OrderPack extends BaseModel
     {
         return $this->belongsTo(Team::class);
     }
+    public function order()
+    {
+        return $this->belongsTo(Order::class);
+    }
+    public function user(){
+        return $this->belongsTo(User::class);
+    }
 }

+ 4 - 1
app/Models/Patient.php

xqd xqd
@@ -7,6 +7,7 @@
  */
 
 namespace App\Models;
+use App\Models\User;
 
 class Patient extends BaseModel
 {
@@ -38,8 +39,10 @@ class Patient extends BaseModel
                 $fill++;
             }
         }
-
         $text = round($fill/$total*100) . '%';
         return $text;
     }
+    public function users(){
+        return $this->hasOne(User::class,'id','user_id');
+    }
 }

+ 0 - 9
app/Models/ServiceApply.php

xqd
@@ -1,9 +0,0 @@
-<?php
-
-namespace App\Models;
-
-use Illuminate\Database\Eloquent\Model;
-
-class ServiceApply extends Model
-{
-}

+ 10 - 0
app/Models/User.php

xqd xqd
@@ -12,6 +12,13 @@ use DB;
 
 class User extends BaseModel
 {
+    protected $appends = ['age'];
+
+    //从生日转成年龄
+    public function getAgeAttribute()
+    {
+        return birthday_to_age($this->birthday);
+    }
     public function getCouponNumAttribute()
     {
         return UserCoupon::where('user_id', $this->id)->where('status', 1)->where('expire_time', '>', time())->count();
@@ -83,4 +90,7 @@ class User extends BaseModel
 
         return true;
     }
+    public function UserBalanceLog(){
+        return $this->hasMany(UserBalanceLog::class);
+    }
 }

+ 3 - 1
app/Models/UserBalanceLog.php

xqd
@@ -10,5 +10,7 @@ namespace App\Models;
 
 class UserBalanceLog extends BaseModel
 {
-
+    public function User(){
+        return $this->belongsTo(User::class);
+    }
 }

+ 17 - 0
app/Models/Vaccines.php

xqd
@@ -0,0 +1,17 @@
+<?php
+
+namespace App\Models;
+
+use Illuminate\Database\Eloquent\Model;
+
+class Vaccines extends Model
+{
+    //
+    protected $table = 'vaccines';
+    public static $_post_type = [
+        1=>"Ⅰ类疫苗",
+        2=>"Ⅱ类疫苗"
+    ];
+
+    protected $fillable = ['type','price',"name","remark","supplier",'states'];
+}

+ 2 - 1
composer.json

xqd
@@ -15,7 +15,8 @@
         "laravel/framework": "^6.0",
         "laravel/tinker": "^1.0",
         "overtrue/wechat": "^4.0",
-        "sven/artisan-view": "^3.3"
+        "sven/artisan-view": "^3.3",
+        "maatwebsite/excel": "^3.1"
     },
     "require-dev": {
         "filp/whoops": "^2.0",

+ 579 - 0
composer.lock

xqd xqd xqd xqd
@@ -1581,6 +1581,352 @@
             "description": "Mime-type detection for Flysystem",
             "time": "2020-09-21T18:10:53+00:00"
         },
+        {
+            "name": "maatwebsite/excel",
+            "version": "3.1.25",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/Maatwebsite/Laravel-Excel.git",
+                "reference": "a3e56f1a60e49f21798fd242a3b3d2f4051eeda7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/a3e56f1a60e49f21798fd242a3b3d2f4051eeda7",
+                "reference": "a3e56f1a60e49f21798fd242a3b3d2f4051eeda7",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-json": "*",
+                "illuminate/support": "5.5.*|5.6.*|5.7.*|5.8.*|^6.0|^7.0|^8.0",
+                "php": "^7.0",
+                "phpoffice/phpspreadsheet": "^1.14"
+            },
+            "require-dev": {
+                "orchestra/testbench": "^6.0",
+                "predis/predis": "^1.1"
+            },
+            "type": "library",
+            "extra": {
+                "laravel": {
+                    "providers": [
+                        "Maatwebsite\\Excel\\ExcelServiceProvider"
+                    ],
+                    "aliases": {
+                        "Excel": "Maatwebsite\\Excel\\Facades\\Excel"
+                    }
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Maatwebsite\\Excel\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Patrick Brouwers",
+                    "email": "patrick@maatwebsite.nl"
+                }
+            ],
+            "description": "Supercharged Excel exports and imports in Laravel",
+            "keywords": [
+                "PHPExcel",
+                "batch",
+                "csv",
+                "excel",
+                "export",
+                "import",
+                "laravel",
+                "php",
+                "phpspreadsheet"
+            ],
+            "support": {
+                "issues": "https://github.com/Maatwebsite/Laravel-Excel/issues",
+                "source": "https://github.com/Maatwebsite/Laravel-Excel/tree/3.1.25"
+            },
+            "funding": [
+                {
+                    "url": "https://laravel-excel.com/commercial-support",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/patrickbrouwers",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-11-13T10:37:36+00:00"
+        },
+        {
+            "name": "maennchen/zipstream-php",
+            "version": "2.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/maennchen/ZipStream-PHP.git",
+                "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58",
+                "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "myclabs/php-enum": "^1.5",
+                "php": ">= 7.1",
+                "psr/http-message": "^1.0",
+                "symfony/polyfill-mbstring": "^1.0"
+            },
+            "require-dev": {
+                "ext-zip": "*",
+                "guzzlehttp/guzzle": ">= 6.3",
+                "mikey179/vfsstream": "^1.6",
+                "phpunit/phpunit": ">= 7.5"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "ZipStream\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Paul Duncan",
+                    "email": "pabs@pablotron.org"
+                },
+                {
+                    "name": "Jonatan Männchen",
+                    "email": "jonatan@maennchen.ch"
+                },
+                {
+                    "name": "Jesse Donat",
+                    "email": "donatj@gmail.com"
+                },
+                {
+                    "name": "András Kolesár",
+                    "email": "kolesar@kolesar.hu"
+                }
+            ],
+            "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
+            "keywords": [
+                "stream",
+                "zip"
+            ],
+            "support": {
+                "issues": "https://github.com/maennchen/ZipStream-PHP/issues",
+                "source": "https://github.com/maennchen/ZipStream-PHP/tree/master"
+            },
+            "funding": [
+                {
+                    "url": "https://opencollective.com/zipstream",
+                    "type": "open_collective"
+                }
+            ],
+            "time": "2020-05-30T13:11:16+00:00"
+        },
+        {
+            "name": "markbaker/complex",
+            "version": "2.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/MarkBaker/PHPComplex.git",
+                "reference": "9999f1432fae467bc93c53f357105b4c31bb994c"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/9999f1432fae467bc93c53f357105b4c31bb994c",
+                "reference": "9999f1432fae467bc93c53f357105b4c31bb994c",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": "^7.2 || ^8.0"
+            },
+            "require-dev": {
+                "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
+                "phpcompatibility/php-compatibility": "^9.0",
+                "phpdocumentor/phpdocumentor": "2.*",
+                "phploc/phploc": "^4.0",
+                "phpmd/phpmd": "2.*",
+                "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3",
+                "sebastian/phpcpd": "^4.0",
+                "squizlabs/php_codesniffer": "^3.4"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Complex\\": "classes/src/"
+                },
+                "files": [
+                    "classes/src/functions/abs.php",
+                    "classes/src/functions/acos.php",
+                    "classes/src/functions/acosh.php",
+                    "classes/src/functions/acot.php",
+                    "classes/src/functions/acoth.php",
+                    "classes/src/functions/acsc.php",
+                    "classes/src/functions/acsch.php",
+                    "classes/src/functions/argument.php",
+                    "classes/src/functions/asec.php",
+                    "classes/src/functions/asech.php",
+                    "classes/src/functions/asin.php",
+                    "classes/src/functions/asinh.php",
+                    "classes/src/functions/atan.php",
+                    "classes/src/functions/atanh.php",
+                    "classes/src/functions/conjugate.php",
+                    "classes/src/functions/cos.php",
+                    "classes/src/functions/cosh.php",
+                    "classes/src/functions/cot.php",
+                    "classes/src/functions/coth.php",
+                    "classes/src/functions/csc.php",
+                    "classes/src/functions/csch.php",
+                    "classes/src/functions/exp.php",
+                    "classes/src/functions/inverse.php",
+                    "classes/src/functions/ln.php",
+                    "classes/src/functions/log2.php",
+                    "classes/src/functions/log10.php",
+                    "classes/src/functions/negative.php",
+                    "classes/src/functions/pow.php",
+                    "classes/src/functions/rho.php",
+                    "classes/src/functions/sec.php",
+                    "classes/src/functions/sech.php",
+                    "classes/src/functions/sin.php",
+                    "classes/src/functions/sinh.php",
+                    "classes/src/functions/sqrt.php",
+                    "classes/src/functions/tan.php",
+                    "classes/src/functions/tanh.php",
+                    "classes/src/functions/theta.php",
+                    "classes/src/operations/add.php",
+                    "classes/src/operations/subtract.php",
+                    "classes/src/operations/multiply.php",
+                    "classes/src/operations/divideby.php",
+                    "classes/src/operations/divideinto.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Mark Baker",
+                    "email": "mark@lange.demon.co.uk"
+                }
+            ],
+            "description": "PHP Class for working with complex numbers",
+            "homepage": "https://github.com/MarkBaker/PHPComplex",
+            "keywords": [
+                "complex",
+                "mathematics"
+            ],
+            "support": {
+                "issues": "https://github.com/MarkBaker/PHPComplex/issues",
+                "source": "https://github.com/MarkBaker/PHPComplex/tree/PHP8"
+            },
+            "time": "2020-08-26T10:42:07+00:00"
+        },
+        {
+            "name": "markbaker/matrix",
+            "version": "2.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/MarkBaker/PHPMatrix.git",
+                "reference": "9567d9c4c519fbe40de01dbd1e4469dbbb66f46a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/9567d9c4c519fbe40de01dbd1e4469dbbb66f46a",
+                "reference": "9567d9c4c519fbe40de01dbd1e4469dbbb66f46a",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": "^7.2 || ^8.0"
+            },
+            "require-dev": {
+                "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
+                "phpcompatibility/php-compatibility": "^9.0",
+                "phpdocumentor/phpdocumentor": "2.*",
+                "phploc/phploc": "^4.0",
+                "phpmd/phpmd": "2.*",
+                "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3",
+                "sebastian/phpcpd": "^4.0",
+                "squizlabs/php_codesniffer": "^3.4"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Matrix\\": "classes/src/"
+                },
+                "files": [
+                    "classes/src/functions/adjoint.php",
+                    "classes/src/functions/antidiagonal.php",
+                    "classes/src/functions/cofactors.php",
+                    "classes/src/functions/determinant.php",
+                    "classes/src/functions/diagonal.php",
+                    "classes/src/functions/identity.php",
+                    "classes/src/functions/inverse.php",
+                    "classes/src/functions/minors.php",
+                    "classes/src/functions/trace.php",
+                    "classes/src/functions/transpose.php",
+                    "classes/src/operations/add.php",
+                    "classes/src/operations/directsum.php",
+                    "classes/src/operations/subtract.php",
+                    "classes/src/operations/multiply.php",
+                    "classes/src/operations/divideby.php",
+                    "classes/src/operations/divideinto.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Mark Baker",
+                    "email": "mark@demon-angel.eu"
+                }
+            ],
+            "description": "PHP Class for working with matrices",
+            "homepage": "https://github.com/MarkBaker/PHPMatrix",
+            "keywords": [
+                "mathematics",
+                "matrix",
+                "vector"
+            ],
+            "support": {
+                "issues": "https://github.com/MarkBaker/PHPMatrix/issues",
+                "source": "https://github.com/MarkBaker/PHPMatrix/tree/PHP8"
+            },
+            "time": "2020-08-28T17:11:00+00:00"
+        },
         {
             "name": "monolog/monolog",
             "version": "2.1.1",
@@ -1668,6 +2014,72 @@
             ],
             "time": "2020-07-23T08:41:23+00:00"
         },
+        {
+            "name": "myclabs/php-enum",
+            "version": "1.7.7",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/myclabs/php-enum.git",
+                "reference": "d178027d1e679832db9f38248fcc7200647dc2b7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/myclabs/php-enum/zipball/d178027d1e679832db9f38248fcc7200647dc2b7",
+                "reference": "d178027d1e679832db9f38248fcc7200647dc2b7",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-json": "*",
+                "php": ">=7.1"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^7",
+                "squizlabs/php_codesniffer": "1.*",
+                "vimeo/psalm": "^3.8"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "MyCLabs\\Enum\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP Enum contributors",
+                    "homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
+                }
+            ],
+            "description": "PHP Enum implementation",
+            "homepage": "http://github.com/myclabs/php-enum",
+            "keywords": [
+                "enum"
+            ],
+            "support": {
+                "issues": "https://github.com/myclabs/php-enum/issues",
+                "source": "https://github.com/myclabs/php-enum/tree/1.7.7"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/mnapoli",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-11-14T18:14:52+00:00"
+        },
         {
             "name": "nesbot/carbon",
             "version": "2.40.0",
@@ -2062,6 +2474,112 @@
             ],
             "time": "2018-07-02T15:55:56+00:00"
         },
+        {
+            "name": "phpoffice/phpspreadsheet",
+            "version": "1.15.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
+                "reference": "a8e8068b31b8119e1daa5b1eb5715a3a8ea8305f"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/a8e8068b31b8119e1daa5b1eb5715a3a8ea8305f",
+                "reference": "a8e8068b31b8119e1daa5b1eb5715a3a8ea8305f",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "ext-ctype": "*",
+                "ext-dom": "*",
+                "ext-fileinfo": "*",
+                "ext-gd": "*",
+                "ext-iconv": "*",
+                "ext-libxml": "*",
+                "ext-mbstring": "*",
+                "ext-simplexml": "*",
+                "ext-xml": "*",
+                "ext-xmlreader": "*",
+                "ext-xmlwriter": "*",
+                "ext-zip": "*",
+                "ext-zlib": "*",
+                "maennchen/zipstream-php": "^2.1",
+                "markbaker/complex": "^1.5|^2.0",
+                "markbaker/matrix": "^1.2|^2.0",
+                "php": "^7.2|^8.0",
+                "psr/http-client": "^1.0",
+                "psr/http-factory": "^1.0",
+                "psr/simple-cache": "^1.0"
+            },
+            "require-dev": {
+                "dompdf/dompdf": "^0.8.5",
+                "friendsofphp/php-cs-fixer": "^2.16",
+                "jpgraph/jpgraph": "^4.0",
+                "mpdf/mpdf": "^8.0",
+                "phpcompatibility/php-compatibility": "^9.3",
+                "phpunit/phpunit": "^8.5|^9.3",
+                "squizlabs/php_codesniffer": "^3.5",
+                "tecnickcom/tcpdf": "^6.3"
+            },
+            "suggest": {
+                "dompdf/dompdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)",
+                "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
+                "mpdf/mpdf": "Option for rendering PDF with PDF Writer",
+                "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Maarten Balliauw",
+                    "homepage": "https://blog.maartenballiauw.be"
+                },
+                {
+                    "name": "Mark Baker",
+                    "homepage": "https://markbakeruk.net"
+                },
+                {
+                    "name": "Franck Lefevre",
+                    "homepage": "https://rootslabs.net"
+                },
+                {
+                    "name": "Erik Tilt"
+                },
+                {
+                    "name": "Adrien Crivelli"
+                }
+            ],
+            "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
+            "homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
+            "keywords": [
+                "OpenXML",
+                "excel",
+                "gnumeric",
+                "ods",
+                "php",
+                "spreadsheet",
+                "xls",
+                "xlsx"
+            ],
+            "support": {
+                "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
+                "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.15.0"
+            },
+            "time": "2020-10-11T13:20:59+00:00"
+        },
         {
             "name": "phpoption/phpoption",
             "version": "1.7.5",
@@ -2341,6 +2859,67 @@
             ],
             "time": "2020-06-29T06:28:15+00:00"
         },
+        {
+            "name": "psr/http-factory",
+            "version": "1.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/http-factory.git",
+                "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
+                "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
+                "shasum": "",
+                "mirrors": [
+                    {
+                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+                        "preferred": true
+                    }
+                ]
+            },
+            "require": {
+                "php": ">=7.0.0",
+                "psr/http-message": "^1.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.0.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Http\\Message\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "http://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interfaces for PSR-7 HTTP message factories",
+            "keywords": [
+                "factory",
+                "http",
+                "message",
+                "psr",
+                "psr-17",
+                "psr-7",
+                "request",
+                "response"
+            ],
+            "support": {
+                "source": "https://github.com/php-fig/http-factory/tree/master"
+            },
+            "time": "2019-04-30T12:38:16+00:00"
+        },
         {
             "name": "psr/http-message",
             "version": "1.0.1",

+ 1 - 1
config/admin.php

xqd
@@ -95,7 +95,7 @@ return [
     | If your page is going to be accessed via https, set it to `true`.
     |
     */
-    'https' => env('ADMIN_HTTPS', true),
+    'https' => env('ADMIN_HTTPS', false),
 
     /*
     |--------------------------------------------------------------------------

+ 36 - 0
database/migrations/2014_10_12_000000_create_users_table.php

xqd
@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateUsersTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('users', function (Blueprint $table) {
+            $table->bigIncrements('id');
+            $table->string('name');
+            $table->string('email')->unique();
+            $table->timestamp('email_verified_at')->nullable();
+            $table->string('password');
+            $table->rememberToken();
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('users');
+    }
+}

+ 32 - 0
database/migrations/2014_10_12_100000_create_password_resets_table.php

xqd
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatePasswordResetsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('password_resets', function (Blueprint $table) {
+            $table->string('email')->index();
+            $table->string('token');
+            $table->timestamp('created_at')->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('password_resets');
+    }
+}

+ 56 - 0
database/migrations/2016_01_04_173148_create_admin_tables.php

xqd
@@ -0,0 +1,56 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateAdminTables extends Migration
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getConnection()
+    {
+        return config('admin.database.connection') ?: config('database.default');
+    }
+
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create(config('admin.database.users_table'), function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('username', 190)->unique();
+            $table->string('password', 60);
+            $table->string('name');
+            $table->string('avatar')->nullable();
+            $table->string('remember_token', 100)->nullable();
+            $table->timestamps();
+        });
+
+        Schema::create(config('admin.database.menu_table'), function (Blueprint $table) {
+            $table->increments('id');
+            $table->integer('parent_id')->default(0);
+            $table->integer('order')->default(0);
+            $table->string('title', 50);
+            $table->string('icon', 50);
+            $table->string('uri')->nullable();
+
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists(config('admin.database.users_table'));
+        Schema::dropIfExists(config('admin.database.menu_table'));
+    }
+}

+ 35 - 0
database/migrations/2019_08_19_000000_create_failed_jobs_table.php

xqd
@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateFailedJobsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('failed_jobs', function (Blueprint $table) {
+            $table->bigIncrements('id');
+            $table->text('connection');
+            $table->text('queue');
+            $table->longText('payload');
+            $table->longText('exception');
+            $table->timestamp('failed_at')->useCurrent();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('failed_jobs');
+    }
+}

+ 0 - 40
database/migrations/2020_11_17_033808_alert_cmds_user.php

xqd
@@ -1,40 +0,0 @@
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-class AlertCmdsUser extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::table('cdms_users',function (Blueprint $table){
-            $table->addColumn('integer','docter_id')->comment('医生id')->nullable(true)->after('org_id');
-        });
-
-        Schema::table('cdms_roles',function (Blueprint $table){
-            $table->addColumn('integer','org_id')->comment('医生id')->after('id');
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::table('cdms_users',function (Blueprint $table){
-            $table->dropColumn('docter_id');
-        });
-
-        Schema::table('cdms_roles',function (Blueprint $table){
-            $table->dropColumn('org_id');
-        });
-    }
-}

+ 0 - 37
database/migrations/2020_11_19_064648_bm_banner.php

xqd
@@ -1,37 +0,0 @@
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-class BmBanner extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        //
-        Schema::create('banner', function (Blueprint $table) {
-            $table->increments('id');
-            $table->integer('type')->comment('分类 1.用户 2.医生');
-            $table->string('image')->comment('图片地址');
-            $table->string('url')->comment('链接')->nullable();
-            $table->integer('status')->comment('状态');
-            $table->dateTime('created_at')->comment('创建时间');
-            $table->dateTime('updated_at')->comment('更新时间');
-        });
-    }
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        //
-        Schema::drop('banner');
-    }
-}

+ 0 - 37
database/migrations/2020_11_19_094540_bm_servebanners.php

xqd
@@ -1,37 +0,0 @@
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-class BmServebanners extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        //
-        Schema::create('servebanners', function (Blueprint $table) {
-            $table->increments('id');
-            $table->string('image')->comment('图片地址');
-            $table->string('url')->comment('链接')->nullable();
-            $table->integer('status')->comment('状态');
-            $table->dateTime('created_at')->comment('创建时间');
-            $table->dateTime('updated_at')->comment('更新时间');
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        //
-        Schema::drop('servebanners');
-    }
-}

+ 0 - 35
database/migrations/2020_11_24_065951_add_table_bm_service_apply.php

xqd
@@ -1,35 +0,0 @@
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-class AddTableBmServiceApply extends Migration
-{
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::create('service_applys', function (Blueprint $table) {
-           $table->increments('id')->comment('自增id');
-           $table->integer('docter_id')->comment('医生id')->nullable(false)->unsigned();
-           $table->integer('service_type')->comment('服务类别 1 图文 2 电话 3 门诊')->nullable(false)->unsigned();
-           $table->integer('status')->comment('审核状态 1 审核 2 已通过 3 已拒绝')->nullable(false)->unsigned();
-           $table->dateTime('created_at')->comment('创建时间');
-           $table->dateTime('updated_at')->comment('更新时间');
-        });
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::drop('service_apply');
-    }
-}

+ 36 - 0
database/migrations/2020_11_25_095040_add_field.php

xqd
@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddField extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        //
+        Schema::table('vaccines', function (Blueprint $table) {
+            $table->unsignedTinyInteger('states')->after('supplier');
+            $table->string('introduction')->after('name');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        //
+        Schema::table('vaccines', function (Blueprint $table) {
+            $table->dropColumn('states');
+            $table->dropColumn('introduction');
+        });
+    }
+}

+ 1 - 1
routes/web.php

xqd
@@ -12,7 +12,7 @@
 */
 
 Route::get('/', function () {
-    return redirect('/admin');
+    return view('welcome');
 });