diff --git a/App/Controllers/ArticleTree.php b/App/Controllers/ArticleTree.php index 9feca21..1cd35e3 100644 --- a/App/Controllers/ArticleTree.php +++ b/App/Controllers/ArticleTree.php @@ -108,6 +108,8 @@ class ArticleTree extends Controller $redis->connect('127.0.0.1', 6379); //查看服务是否运行 $commentModel = new Models\DocComment(); + $vertime = urldecode((string)$this->params[1]); + $doccoment = $commentModel->DocComments((int)$this->params[0]); if(sizeof($this->params) > 0){ @@ -118,15 +120,26 @@ class ArticleTree extends Controller $firstpagedocs = []; $child_docs = $docModel->getChildrenDocs($this->params[0]); - $doc = $docModel->docTree((int)$this->params[0]); - $doc = array_merge($doc,$child_docs); - $top5 = $docModel->top5Doc(); + $doc = []; + if($vertime != ""){ + $doc = $docModel->docHistoryTree((int)$this->params[0],$vertime); + $doc = array_merge($doc,$child_docs); - $doc_history = $docModel->doc_history((int)$this->params[0]); + }else{ + $doc = $docModel->docTree((int)$this->params[0]); + $doc = array_merge($doc,$child_docs); + } + $top5 = $docModel->top5Doc(); $markdowntoc = new \ParsedownToC(); $doc[0]['content'] = $markdowntoc->body($doc[0]['content']); $doc[0]['toc'] = $markdowntoc->contentsList(); + // $doc_history = $docModel->doc_history((int)$this->params[0]); + if($vertime == ""){ + + }else{ + + } $markdown = new Parsedown; foreach ($doc as $key => $value) { @@ -152,7 +165,7 @@ class ArticleTree extends Controller "docs"=>$doc, "comments" => $doccoment, "comment_count" => count($doccoment), - "doc_type"=>$doc[0]["type"], + // "doc_type"=>$doc[0]["type"], "openapi"=>\App\Config::OpenApiUrl(), "treedoc"=>$doc_all, "topdoc"=>$top5, diff --git a/App/Models/Doc.php b/App/Models/Doc.php index 1aab177..c7bc0a2 100644 --- a/App/Models/Doc.php +++ b/App/Models/Doc.php @@ -125,7 +125,16 @@ class Doc extends Model return $recv; } } - + public function docHistoryTree($id,$time){ + if(is_integer($id)){ + $db = static::getDB(); + $stmt = $db->query('select * from + doc_history where doc_id = '.$id . ' + and edit_time = '.'\''. $time.'\''); + $recv = $stmt->fetchAll(); + return $recv; + } + } public function titleDoc($title){ $db = static::getDB(); $stmt = $db->query('select * from doc_copy1 where title = \''.$title.'\''); @@ -162,6 +171,7 @@ class Doc extends Model $result = $stmt->fetchAll(); return $result; } + public function getAllTypeDocs(){ $typedocs = []; $doctypes = $this->getTypes(); diff --git a/App/Views/blog/article.html b/App/Views/blog/article.html index f76d77f..54ebaee 100644 --- a/App/Views/blog/article.html +++ b/App/Views/blog/article.html @@ -214,10 +214,12 @@ function expandNode(e) {
{{ doc.title }} 历史版本: - {% for vertime in vestimes %} - + {% endfor %}
diff --git a/App/Views/blog/template/work.html b/App/Views/blog/template/work.html index 435a090..f4f9da3 100644 --- a/App/Views/blog/template/work.html +++ b/App/Views/blog/template/work.html @@ -24,7 +24,7 @@
-
-

- webrtc easy demo -

-

- webrtc c++ native 库 demo - 实现功能: -

-

- 基于QT -

-

- webrtc摄像头/桌面捕获功能 -

-

- opengl渲染/多播放窗格管理 -

-

- janus meeting room -

-

-

- -

- 下载地址和源码 -

-

- 源码 - 二进制包 -

-
-
-

- wifi,蓝牙 - 无线开关 -

- -

- 实现功能: -

-

- 通过wifi/蓝牙实现远程开关电器或者其他电子设备 -

-

- 电路原理图: -

- -

- 实物图: -

- -
-
-

- 深度学习验证工具 -

-
+
+
+

+ webrtc easy demo +

+

+ webrtc c++ native 库 demo + 实现功能: +

+

+ 基于QT +

+

+ webrtc摄像头/桌面捕获功能 +

+

+ opengl渲染/多播放窗格管理 +

+

+ janus meeting room +

+

+

+ +

+ 下载地址和源码 +

+

+ 源码 + 二进制包 +

+
+
+

+ wifi,蓝牙 - 无线开关 +

+ +

+ 实现功能: +

+

+ 通过wifi/蓝牙实现远程开关电器或者其他电子设备 +

+

+ 电路原理图: +

+ +

+ 实物图: +

+ +
+
+

+ 深度学习验证工具 +

+
+
+

+ 虚拟示波器 +

+

+ 硬件实物图: +

+ +

+ 实现原理 +

+ +

+ 基本性能 +

+

+ 采集频率: 取决于外部adc模块和ebaz4205矿板的以太网接口速率,最高可以达到100M/8 约为12.5MPS +

+

+ 上位机实现功能: 采集,显示波形,存储wave文件。 +

+

+ 参数可运行时配置 +

+

+ 上位机: +

+ +

+ 显示缓冲区大小可调 +

+

+ 刷新率可调节 +

+

+ 触发显示刷新可调节 +

+