From 1b0ca773a7bded2778b7ee13496d78dcabba218a Mon Sep 17 00:00:00 2001 From: zcy Date: Fri, 5 May 2023 23:54:51 +0800 Subject: [PATCH] no message --- App/Config.php | 11 +++ App/Controllers/ArticleTree.php | 2 +- App/Controllers/NewUi.php | 7 +- App/Views/blog/template/work.html | 133 +++++++++++++++++------------- Core/View.php | 4 +- composer.json | 2 +- 6 files changed, 94 insertions(+), 65 deletions(-) diff --git a/App/Config.php b/App/Config.php index 898b100..64e0741 100644 --- a/App/Config.php +++ b/App/Config.php @@ -74,6 +74,17 @@ class Config return "https://www.testingcloud.club/sapi/"; } + static public function RedisServer() { + if("localhost" == $_SERVER['SERVER_NAME']){ + return "192.168.0.200"; + } + if ( "0.0.0.0" == $_SERVER['SERVER_NAME']){ + return "192.168.0.200"; + } + if("testingcloud.club" == $_SERVER['SERVER_NAME']){ + return "127.0.0.1"; + } + } } diff --git a/App/Controllers/ArticleTree.php b/App/Controllers/ArticleTree.php index 9feca21..41707f4 100644 --- a/App/Controllers/ArticleTree.php +++ b/App/Controllers/ArticleTree.php @@ -105,7 +105,7 @@ class ArticleTree extends Controller } function articleAction(){ $redis = new \Redis(); - $redis->connect('127.0.0.1', 6379); + $redis->connect(\App\Config::RedisServer(), 6379); //查看服务是否运行 $commentModel = new Models\DocComment(); $doccoment = $commentModel->DocComments((int)$this->params[0]); diff --git a/App/Controllers/NewUi.php b/App/Controllers/NewUi.php index 618ad3c..b3df028 100644 --- a/App/Controllers/NewUi.php +++ b/App/Controllers/NewUi.php @@ -1,6 +1,5 @@ connect('127.0.0.1', 6379); + print_r(\App\Config::RedisServer()); + $redis->connect(\App\Config::RedisServer(), 6379); $docModel = new Models\Doc(); $limit = 5; @@ -26,6 +25,8 @@ class NewUi extends Controller $doc_all = $docModel->getArticlesTree(-1); $redis->set("artilcetree", $doc_all); } + // $doc_all = $docModel->getArticlesTree(-1); + $groupstype = $docModel->GetAllGroupType(); if(sizeof($this->params) == 2){ diff --git a/App/Views/blog/template/work.html b/App/Views/blog/template/work.html index 435a090..ec87ac8 100644 --- a/App/Views/blog/template/work.html +++ b/App/Views/blog/template/work.html @@ -27,7 +27,7 @@
  • 数据采集器(软硬件)
  • 无线开关
  • 深度学习模型验证工具
  • - +
  • vtk点云编辑工具
  • @@ -66,63 +66,80 @@ qt qml版本源码 二进制包

    -
    -
    -

    - 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/蓝牙实现远程开关电器或者其他电子设备 +

    +

    + 电路原理图: +

    + +

    + 实物图: +

    + +
    +
    +

    + 深度学习验证工具 +

    +
    +
    +

    + vtk+pcl 点云编辑工具 +

    + +

    + 实现功能: +

    +

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

    +

    + 电路原理图: +

    + + +
    diff --git a/Core/View.php b/Core/View.php index 5f4c716..1b1988a 100644 --- a/Core/View.php +++ b/Core/View.php @@ -39,8 +39,8 @@ class View { static $twig = null; if ($twig === null) { - $loader = new \Twig_Loader_Filesystem(dirname(__DIR__) . '/App/Views'); - $twig = new \Twig_Environment($loader); + $loader = new \Twig\Loader\FilesystemLoader(dirname(__DIR__) . '/App/Views'); + $twig = new \Twig\Environment($loader); } echo $twig->render($template, $args); } diff --git a/composer.json b/composer.json index 56ce4bc..b91c4fb 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "require": { "twig/twig": "~2.0", - "propel/propel": "~2.0@dev", + "propel/propel": "~2.0@dev", "erusev/parsedown": "^1.7", "hoegh/parsedown-toc": "^1.3" },