From 58ab432f9d7733ca3a7317ae31eb4e28d096d577 Mon Sep 17 00:00:00 2001 From: "DESKTOP-4RNDQIC\\29019" <290198252@qq.com> Date: Sun, 12 Jul 2020 02:16:35 +0800 Subject: [PATCH] no message --- App/Config.php | 2 ++ App/Controllers/Blog.php | 1 - App/Controllers/NewUi.php | 7 +++++++ App/Views/blog/index.html | 34 +++++++++++++++++++++++++++++++--- Core/Controller.php | 2 ++ 5 files changed, 42 insertions(+), 4 deletions(-) diff --git a/App/Config.php b/App/Config.php index 69cac36..da4cb5d 100644 --- a/App/Config.php +++ b/App/Config.php @@ -40,6 +40,8 @@ class Config const SHOW_ERRORS = true; static public $DEBUG = false; + const ARTICLE_URL = "/api/public/Blog/article"; + static public function Url(){ if (true == Config::$DEBUG){ return "/api/public/Blog/"; diff --git a/App/Controllers/Blog.php b/App/Controllers/Blog.php index 488e2a2..9e3ef24 100644 --- a/App/Controllers/Blog.php +++ b/App/Controllers/Blog.php @@ -53,7 +53,6 @@ class Blog extends Controller function articleAction() { if(sizeof($this->querys) != 0){ - echo '
';
             $docModel = new Models\Doc();
             $commentModel = new Models\DocComment();
             $doc = $docModel->titleDoc(rawurldecode( $this->querys['title']));
diff --git a/App/Controllers/NewUi.php b/App/Controllers/NewUi.php
index 7441a84..c8e907f 100644
--- a/App/Controllers/NewUi.php
+++ b/App/Controllers/NewUi.php
@@ -21,6 +21,8 @@ class NewUi extends Controller
         $groups = $docModel->getGroups();
         $groupstype = $docModel->GetAllGroupType();
         echo  "
";
+        print_r($this->route_params);
+        print_r($this->params);
         echo  "
"; @@ -61,4 +63,9 @@ class NewUi extends Controller ]); } } + function articleAction(){ + if(sizeof($this->params) < 2){ + + } + } } \ No newline at end of file diff --git a/App/Views/blog/index.html b/App/Views/blog/index.html index a13493b..b695231 100644 --- a/App/Views/blog/index.html +++ b/App/Views/blog/index.html @@ -38,7 +38,7 @@
{% for key,group_type in group_types %}
-
-
+
@@ -87,6 +99,12 @@ if(globalposx > 250){ $('#grouptab').fadeOut(1000); } + if(globalposx > 400){ + $('#doctype').fadeOut(1000); + } + if(globalposx > 500){ + $('#docs').fadeOut(1000); + } } $(function() { var defaultData = [ @@ -144,11 +162,21 @@ data: defaultData }) setInterval("startRequest()",1000); + $('#docs').hide(); + $('#doctype').hide(); + }); + $(document).mousemove(function(e){ if(e.pageX < 250){ $('#grouptab').fadeIn(2000); } + if(e.pageX < 400){ + $('#doctype').fadeIn(2000); + } + if(e.pageX < 500){ + $('#docs').fadeIn(2000); + } globalposx = e.pageX; }); diff --git a/Core/Controller.php b/Core/Controller.php index 4d1af75..2953c9c 100644 --- a/Core/Controller.php +++ b/Core/Controller.php @@ -21,6 +21,7 @@ abstract class Controller protected $input; protected $debug = false; protected $query_string; + protected $params = []; /** * Class constructor * @@ -47,6 +48,7 @@ abstract class Controller } $this->route_params = $route_params; + $this->params = explode('/',$route_params['id']); } /** * Magic method called when a non-existent or inaccessible method is