From 3cc99a646c50a2353c3a4a1cb2bb5f613cff5a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Mon, 11 Jan 2021 16:12:53 +0800 Subject: [PATCH] 0 --- app/admin/controller/Index.php | 4 ++-- app/admin/route/admin.php | 4 ++-- app/kaoshi/controller/Index.php | 8 ++------ database/migrations/20210107070200_kaoshi_up.php | 6 ++---- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index e9a7ab8b..573f2af3 100755 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -149,7 +149,7 @@ class Index extends AdminBase // 读取用户信息 - public function myinfo() + public function myInfo() { $id = session('user_id'); $ad = new AD; @@ -289,7 +289,7 @@ class Index extends AdminBase // 重置密码 - public function resetpassword($id) + public function resetPassword($id) { // 生成密码 $md5 = new APR1_MD5(); diff --git a/app/admin/route/admin.php b/app/admin/route/admin.php index 947d1979..83a0bc94 100755 --- a/app/admin/route/admin.php +++ b/app/admin/route/admin.php @@ -21,10 +21,10 @@ Route::group('index', function () { Route::rule('update/', 'Index/update', 'put'); # 更新信息 Route::rule('delete/', 'Index/delete', 'delete'); # 删除信息 Route::rule('status', 'Index/setStatus', 'post'); # 删除信息 - Route::rule('resetpassword/', 'Index/resetpassword', 'post'); # 重置密码 + Route::rule('resetpassword/', 'Index/resetPassword', 'post'); # 重置密码 Route::rule('editpassword', 'Index/editPassword', 'get'); # 修改密码 Route::rule('updatepassword/', 'Index/updatePassword', 'put'); # 更新密码 - Route::rule('myinfo', 'Index/myinfo', 'get'); # 用户信息 + Route::rule('myinfo', 'Index/myInfo', 'get'); # 用户信息 Route::rule('adminlist', 'Index/adminList', 'post'); # 用户信息 }); diff --git a/app/kaoshi/controller/Index.php b/app/kaoshi/controller/Index.php index 51359bcd..3c916e17 100755 --- a/app/kaoshi/controller/Index.php +++ b/app/kaoshi/controller/Index.php @@ -93,6 +93,8 @@ class Index extends AdminBase ,'bfdate' ,'enddate' ,'zuzhi_id' + ,'user_group' => session('onlineCategory') + ,'user_id' => session('user_id') ], 'post'); // 验证表单数据 @@ -102,9 +104,6 @@ class Index extends AdminBase if(!$result){ return json(['msg' => $msg, 'val' => 0]); } - $list['user_id'] = session('user_id'); - $list['user_group'] = 'admin'; - // $list['jibie_id'] = 1; // 保存数据 $ks = new KS(); @@ -175,9 +174,6 @@ class Index extends AdminBase } - - - // 设置成绩是否允许操作 public function luru() { diff --git a/database/migrations/20210107070200_kaoshi_up.php b/database/migrations/20210107070200_kaoshi_up.php index ec2e3725..30529442 100644 --- a/database/migrations/20210107070200_kaoshi_up.php +++ b/database/migrations/20210107070200_kaoshi_up.php @@ -32,9 +32,8 @@ class KaoshiUp extends Migrator $table = $this->table('kaoshi'); $table - ->addColumn('user_id','integer',array('after' => 'category_id'),['limit'=>11,'default'=>0,'null'=>false,'comment'=>'用户ID']) - ->addColumn('user_group','string',array('after' => 'user_id'),['limit'=>25,'default'=>'a','null'=>false,'comment'=>'用户组']) - ->addColumn('jibie_id','integer',array('after' => 'user_group'),['limit'=>11,'default'=>1,'null'=>false,'comment'=>'级别ID']) + ->addColumn('user_id','integer',['after' => 'category_id', 'limit'=>11,'default'=>0,'null'=>false,'comment'=>'用户ID']) + ->addColumn('user_group','string',['after' => 'user_id', 'limit'=>25,'default'=>'admin','null'=>false,'comment'=>'用户组']) ->update(); } @@ -47,7 +46,6 @@ class KaoshiUp extends Migrator $table ->removeColumn('user_id') ->removeColumn('user_group') - ->removeColumn('jibie_id') ->update(); } }