From 614e20f5966283e56ba24a8a301a27d3ce751549 Mon Sep 17 00:00:00 2001
From: "DESKTOP-4RNDQIC\\29019" <290198252@qq.com>
Date: Thu, 18 Jun 2020 00:14:40 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E6=AD=A5=E5=AE=8C=E6=88=90=E6=90=9C?=
=?UTF-8?q?=E7=B4=A2=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App/Controllers/Blog.php | 3 +++
App/Views/blog/basic.html | 16 ++++++----------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/App/Controllers/Blog.php b/App/Controllers/Blog.php
index 94fc5f6..488e2a2 100644
--- a/App/Controllers/Blog.php
+++ b/App/Controllers/Blog.php
@@ -62,6 +62,7 @@ class Blog extends Controller
$content = $markdown->text($doc[0]['content']);
$typedocs = $docModel->getAllTypeDocs();
$doccoment = $commentModel->DocComments($id);
+ $titles = $docModel->AllTitle();
echo '';
if(\App\Config::$DEBUG)
View::renderTemplate("/blog/basic.html",
@@ -78,6 +79,7 @@ class Blog extends Controller
"comments" => $doccoment,
"comment_count" => count($doccoment),
"docid"=>$id,
+ "alltitle" => $titles,
]);
else
View::renderTemplate("/blog/basic.html",[
@@ -91,6 +93,7 @@ class Blog extends Controller
"comments" => $doccoment,
"comment_count" => count($doccoment),
"docid"=>$id,
+ "alltitle" => $titles,
]);
}else{
View::renderTemplate("/blog/basic.html",['title'=>'test','index'=>false]);
diff --git a/App/Views/blog/basic.html b/App/Views/blog/basic.html
index 96715e4..27ff653 100644
--- a/App/Views/blog/basic.html
+++ b/App/Views/blog/basic.html
@@ -174,14 +174,9 @@ ul li a{
{% endfor %}
-
-
-
@@ -221,11 +216,12 @@ ul li a{
appendTo: 'body',
duration: 200,
}
- ).on('select.editable-select', function (e, li) {
- console.log(e);
- }).on('shown.editable-select',function (e,li) {
- console.log(e);
+ ).on('select.editable-select',function (e,li) {
+ console.log(li.text());
+ window.location.replace("{{ url }}article?title=" + li.text() + "&type=0");
});
-
+ function toTitle() {
+ console.log($('#editable-select').innerText);
+ }