初步完成搜索功能
parent
e036e35d1c
commit
614e20f596
|
@ -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 '</pre>';
|
||||
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]);
|
||||
|
|
|
@ -174,14 +174,9 @@ ul li a{
|
|||
<option>{{ title.title }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button style=" font-size: 25px; background: #20375f; color: white;" >
|
||||
确定
|
||||
</button>
|
||||
</form>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php echo {{ route }} ?>
|
||||
|
@ -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);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue