diff --git a/app/admin/model/Admin.php b/app/admin/model/Admin.php index ca4f18c0..2d89a907 100644 --- a/app/admin/model/Admin.php +++ b/app/admin/model/Admin.php @@ -84,11 +84,11 @@ class Admin extends Base } - // // 最后登录时间取器 - // public function getLasttimeAttr($value) - // { - // return date('Y年m月d日 H:i:s',$value); - // } + // 最后登录时间取器 + public function getLasttimeAttr($value) + { + return date('Y年m月d日 H:i:s',$value); + } // 本次登录时间取器 public function getThistimeAttr($value) diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php index 9c34c48d..df721299 100644 --- a/app/index/controller/Index.php +++ b/app/index/controller/Index.php @@ -158,5 +158,4 @@ class Index extends BaseController return $view->fetch('welcome'); } - } diff --git a/app/index/route/index.php b/app/index/route/index.php index c120a52e..a39ace6f 100644 --- a/app/index/route/index.php +++ b/app/index/route/index.php @@ -15,3 +15,4 @@ use think\facade\Route; Route::rule('/','index/index','get'); //主页 Route::rule('welcome','index/welcome','get'); //欢迎页 + diff --git a/app/index/view/index/myerror.html b/app/index/view/index/myerror.html new file mode 100644 index 00000000..9f327daf --- /dev/null +++ b/app/index/view/index/myerror.html @@ -0,0 +1,26 @@ + + + + + {$list['webtitle']} {$list['version']} + + + + + + + + {load href="__XADMIN__/css/font.css" /} + {load href="__XADMIN__/css/xadmin.css" /} + + +
+
+
+

+

页面或者数据被 纸飞机 运到火星了,啥都看不到了…

+
+
+
+ + \ No newline at end of file diff --git a/app/login/controller/Index.php b/app/login/controller/Index.php index dce94d37..1b8b53f2 100644 --- a/app/login/controller/Index.php +++ b/app/login/controller/Index.php @@ -31,7 +31,8 @@ class Index // 清除session(当前作用域) session(null); - // 获取系统版本号 + // 获取系统名称和版本号 + $list['webtitle'] = Config::get('shangma.webtitle'); $list['version'] = Config::get('shangma.version'); View::assign('list',$list); @@ -146,5 +147,20 @@ class Index // 渲染模板 return View::fetch(); } + + + // 错误页面 + public function myerror() + { + + // 获取系统名称和版本号 + $list['webtitle'] = Config::get('shangma.webtitle'); + $list['version'] = Config::get('shangma.version'); + + View::assign('list',$list); + + // 渲染输出 + return View::fetch(); + } } diff --git a/app/login/route/login.php b/app/login/route/login.php index 5d58114b..47002b2d 100644 --- a/app/login/route/login.php +++ b/app/login/route/login.php @@ -10,15 +10,17 @@ // +---------------------------------------------------------------------- use think\facade\Route; -Route::rule('/','index/index','get'); -Route::rule('/','index/yanzheng','post'); -Route::rule('log','index/shangmaLog','get'); # 配置更新 +// Route::rule('/','index/index','get'); +// Route::rule('/','index/yanzheng','post'); +// Route::rule('log','index/shangmaLog','get'); # 配置更新 +// Route::rule('myerror','index/myerror','get'); //错误页 // 系统设置systembase -Route::group('login', function () { - +Route::group('', function () { Route::rule('','index/index','get'); Route::rule('','index/yanzheng','post'); Route::rule('log','index/shangmaLog','get'); # 配置更新 + Route::rule('err','index/myerror','get'); //错误页 + }); diff --git a/app/login/view/index/index.html b/app/login/view/index/index.html index a14051c3..e777ec33 100644 --- a/app/login/view/index/index.html +++ b/app/login/view/index/index.html @@ -2,7 +2,7 @@ - 成绩管理系统 v{$list['version']} + {$list['webtitle']} {$list['version']} @@ -21,7 +21,7 @@
-
成绩管理v{$list['version']}-管理登录
+
{$list['webtitle']} {$list['version']}-用户登录
diff --git a/app/login/view/index/myerror.html b/app/login/view/index/myerror.html new file mode 100644 index 00000000..9f327daf --- /dev/null +++ b/app/login/view/index/myerror.html @@ -0,0 +1,26 @@ + + + + + {$list['webtitle']} {$list['version']} + + + + + + + + {load href="__XADMIN__/css/font.css" /} + {load href="__XADMIN__/css/xadmin.css" /} + + +
+
+
+

+

页面或者数据被 纸飞机 运到火星了,啥都看不到了…

+
+
+
+ + \ No newline at end of file diff --git a/app/renshi/controller/Teacher.php b/app/renshi/controller/Teacher.php index 1588ae86..1e6f3ecd 100644 --- a/app/renshi/controller/Teacher.php +++ b/app/renshi/controller/Teacher.php @@ -403,7 +403,7 @@ class Teacher extends BaseController public function upload() { // 获取文件信息 - $list['text'] = $this->request->post('text'); + $list['category'] = $this->request->post('category'); $list['serurl'] = $this->request->post('serurl'); // 获取表单上传文件 diff --git a/app/system/controller/SystemBase.php b/app/system/controller/SystemBase.php index ffbbec83..8a936365 100644 --- a/app/system/controller/SystemBase.php +++ b/app/system/controller/SystemBase.php @@ -14,7 +14,7 @@ class SystemBase extends BaseController public function edit() { // 获取用户信息 - $list['data'] = sysbasemod::field('id,webtitle,keywords,description,thinks,danwei') + $list['data'] = sysbasemod::field('id,keywords,description,thinks,danwei') ->order(['id'=>'desc']) ->find(); @@ -40,7 +40,7 @@ class SystemBase extends BaseController $validate = new \app\system\validate\SystemBase; // 获取表单数据 - $list = request()->only(['webtitle','keywords','description','thinks','danwei'],'put'); + $list = request()->only(['keywords','description','thinks','danwei'],'put'); $list['id'] = $id; // 验证表单数据 diff --git a/app/system/validate/SystemBase.php b/app/system/validate/SystemBase.php index 283a7a5e..1268875f 100644 --- a/app/system/validate/SystemBase.php +++ b/app/system/validate/SystemBase.php @@ -13,7 +13,6 @@ class SystemBase extends Validate * @var array */ protected $rule = [ - 'webtitle|标题' => 'require|length:2,50', 'keywords|关键字' => 'require|length:2,60', 'description|描述' => 'require|length:1,100', 'thinks|感谢' => 'require|length:1,80', diff --git a/app/system/view/systembase/edit.html b/app/system/view/systembase/edit.html index 431cb694..dc32458e 100644 --- a/app/system/view/systembase/edit.html +++ b/app/system/view/systembase/edit.html @@ -22,15 +22,6 @@
-
- -
- -
-