修复主页问题

doctree
zcy 2022-12-25 01:05:45 +08:00
parent f015dfac41
commit 9f4948d778
6 changed files with 36 additions and 7 deletions

View File

@ -98,8 +98,9 @@ class NewUi extends Controller
$doc[0]['content'] = $markdown->body($doc[0]['content']);
$doc[0]['toc'] = $markdown->contentsList();
$top5 = $docModel->top5Doc();
$doc_history = $docModel->doc_history((int)$this->params[0]);
var_dump($doc_history);
foreach ($fisrtpage as $key => $value) {
$obj['title'] = $value['title'];
$obj['id'] = $value['id'];
@ -155,6 +156,8 @@ class NewUi extends Controller
]);
}
}
function searchAction()
{
if (sizeof($this->querys) != 0) {

View File

@ -89,6 +89,14 @@ class Doc extends Model
$recv = $stmt->fetchAll();
return $recv;
}
public function doc_history($doc_id){
$result = [];
$db = static::getDB();
print_r('select * from doc_history where doc_history.doc_id = '.$doc_id);
$stmt = $db->query('select * from doc_history where doc_history.doc_id = '.$doc_id);
$recv = $stmt->fetchAll();
return $recv;
}
public function top5Doc(){
$result = [];
$db = static::getDB();
@ -115,19 +123,19 @@ class Doc extends Model
public function titleDoc($title){
$db = static::getDB();
$stmt = $db->query('select * from doc where title = \''.$title.'\' and doc.is_public = 0');
$stmt = $db->query('select * from doc_copy1 where title = \''.$title.'\'');
$recv = $stmt->fetchAll();
return $recv;
}
public function titleLikeDoc($title){
$db = static::getDB();
$stmt = $db->query('select title from doc where title like \'%'.$title.'%\' and doc.is_public = 0');
$stmt = $db->query('select title from doc_copy1 where title like \'%'.$title.'%\' and doc.is_public = 0');
$recv = $stmt->fetchAll();
return $recv;
}
public function Count(){
$db = static::getDB();
$stmt = $db->query('select count(*) from doc');
$stmt = $db->query('select count(*) from doc_copy1');
$result = $stmt->fetchAll();
return $result;
}
@ -139,7 +147,7 @@ class Doc extends Model
}
public function AllTitle(){
$db = static::getDB();
$stmt = $db->query('select title from doc');
$stmt = $db->query('select title from doc_copy1');
$result = $stmt->fetchAll();
return $result;
}

View File

@ -214,8 +214,19 @@ function expandNode(e) {
{% for doc in docs %}
<div class="panel panel-default" id="doc_id_{{ doc.id }}" style="letter-spacing: 0.4px;">
<div class="panel-heading" style="font-size: 20px ; background: #1d5987;color: white">
{{ doc.title }}
{{ doc.title }} 历史版本:
<select NAME="TEMP" οnchange="" style="font-size: 20px ; background: #1d5987;color: white;margin-left: 15px; ">
<option value></option>
<option value="AAAAAA">AAAAAA</option>
<option value="BBBBBB">BBBBBB</option>
<option value="CCCCCC">CCCCCC</option>
<option value="DDDDDD">DDDDDD</option>
<option value="EEEEEE">EEEEEE</option>
<option value="FFFFFF">FFFFFF</option>
</select>
<div style="float: right; margin-right: 30px;">
上次修改时间: {{ doc.update_time }}
</div>

View File

@ -26,6 +26,7 @@
<li> <a href="#webrtc" data-toggle="tab">webrtc native demo</a></li>
<li> <a href="#ui2css" data-toggle="tab">数据采集器(软硬件)</a></li>
<li> <a href="#wireless_open" data-toggle="tab">无线开关</a></li>
<li> <a href="#learning_tool" data-toggle="tab">深度学习模型验证工具</a></li>
</ul>
</div>
@ -117,6 +118,11 @@
</p>
<img src="https://www.testingcloud.club/sapi/api/image_download/cd68064f-e49a-11ec-827c-525400986ccb.jpeg">
</div>
<div class="tab-pane fade in active" id="learning_tool">
<p style="display: block;font-size: 25px ; text-align: left;">
深度学习验证工具
</p>
</div>
</div>
</div>
</div>

View File

@ -4,3 +4,5 @@ tar.exe -czf ../code.tar.gz ./*
scp -i ./id_rsa ../code.tar.gz ubuntu@117.50.176.114:/home/ubuntu/
ssh -t -i ./id_rsa ubuntu@117.50.176.114 sudo tar -zxvf /home/ubuntu/code.tar.gz -C /var/www/html/api/
ssh -t -i ./id_rsa ubuntu@117.50.176.114 sudo rm /home/ubuntu/code.tar.gz

View File

@ -46,7 +46,6 @@ if($_SERVER['HTTP_HOST'] == '192.168.3.100'){
}
if($_SERVER['HTTP_HOST'] == '117.50.176.114'){
$router->AddPrefix("/wapi/");
//\App\Config::$DEBUG = true;
}