diff --git a/CHANGELOG.md b/CHANGELOG.md index d5ac9d27..26b077a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +### [v1.2.5](https://gitee.com/koogua/course-tencent-cloud/releases/v1.2.5)(2021-01-20) + +### 新增 + +- 自动化安装脚本 +- 自动化更新脚本 +- 自动化备份脚本 + +### 更新 + +- 更新ip2region包 +- 更新php-cron-scheduler包 +- 替换aferrandini/phpqrcode为endroid/qr-code +- 替换joyqi/hyper-down为league/commonmark +- 移除lcobucci/jwt包 +- 相关连接指向官网 + ### [v1.2.4](https://gitee.com/koogua/course-tencent-cloud/releases/v1.2.4)(2021-01-10) #### 增加 diff --git a/README.md b/README.md index 29951f81..b8019549 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,11 @@ 酷瓜云课堂,依托腾讯云基础服务架构,采用C扩展框架Phalcon开发,GPL-2.0开源协议,致力开源网课系统,开源网校系统,开源在线教育系统。 - - - - +[](https://gitee.com/koogua/course-tencent-cloud) +[](https://gitee.com/koogua/course-tencent-cloud) +[](https://github.com/xiaochong0302/course-tencent-cloud) +[](https://github.com/xiaochong0302/course-tencent-cloud) + ### 系统功能 diff --git a/app/Console/Tasks/CourseIndexTask.php b/app/Console/Tasks/CourseIndexTask.php index 23a148cc..ec4fc523 100644 --- a/app/Console/Tasks/CourseIndexTask.php +++ b/app/Console/Tasks/CourseIndexTask.php @@ -60,11 +60,11 @@ class CourseIndexTask extends Task $index = $handler->getXS()->getIndex(); - echo 'start clean index' . PHP_EOL; + echo 'start clean course index' . PHP_EOL; $index->clean(); - echo 'end clean index' . PHP_EOL; + echo 'end clean course index' . PHP_EOL; } /** @@ -82,7 +82,7 @@ class CourseIndexTask extends Task $index = $handler->getXS()->getIndex(); - echo 'start rebuild index' . PHP_EOL; + echo 'start rebuild course index' . PHP_EOL; $index->beginRebuild(); @@ -93,7 +93,7 @@ class CourseIndexTask extends Task $index->endRebuild(); - echo 'end rebuild index' . PHP_EOL; + echo 'end rebuild course index' . PHP_EOL; } /** diff --git a/app/Console/Tasks/GroupIndexTask.php b/app/Console/Tasks/GroupIndexTask.php index 4e9c2918..2b3818c8 100644 --- a/app/Console/Tasks/GroupIndexTask.php +++ b/app/Console/Tasks/GroupIndexTask.php @@ -60,11 +60,11 @@ class GroupIndexTask extends Task $index = $handler->getXS()->getIndex(); - echo 'start clean index' . PHP_EOL; + echo 'start clean group index' . PHP_EOL; $index->clean(); - echo 'end clean index' . PHP_EOL; + echo 'end clean group index' . PHP_EOL; } /** @@ -82,7 +82,7 @@ class GroupIndexTask extends Task $index = $handler->getXS()->getIndex(); - echo 'start rebuild index' . PHP_EOL; + echo 'start rebuild group index' . PHP_EOL; $index->beginRebuild(); @@ -93,7 +93,7 @@ class GroupIndexTask extends Task $index->endRebuild(); - echo 'end rebuild index' . PHP_EOL; + echo 'end rebuild group index' . PHP_EOL; } /** diff --git a/app/Console/Tasks/UserIndexTask.php b/app/Console/Tasks/UserIndexTask.php index 6ce9c7d6..ccf999f4 100644 --- a/app/Console/Tasks/UserIndexTask.php +++ b/app/Console/Tasks/UserIndexTask.php @@ -60,11 +60,11 @@ class UserIndexTask extends Task $index = $handler->getXS()->getIndex(); - echo 'start clean index' . PHP_EOL; + echo 'start clean user index' . PHP_EOL; $index->clean(); - echo 'end clean index' . PHP_EOL; + echo 'end clean user index' . PHP_EOL; } /** @@ -82,7 +82,7 @@ class UserIndexTask extends Task $index = $handler->getXS()->getIndex(); - echo 'start rebuild index' . PHP_EOL; + echo 'start rebuild user index' . PHP_EOL; $index->beginRebuild(); @@ -93,7 +93,7 @@ class UserIndexTask extends Task $index->endRebuild(); - echo 'end rebuild index' . PHP_EOL; + echo 'end rebuild user index' . PHP_EOL; } /** diff --git a/app/Http/Admin/Controllers/IndexController.php b/app/Http/Admin/Controllers/IndexController.php index 4684800a..7b7b9da2 100644 --- a/app/Http/Admin/Controllers/IndexController.php +++ b/app/Http/Admin/Controllers/IndexController.php @@ -39,11 +39,13 @@ class IndexController extends Controller $todayStat = $indexService->getTodayStat(); $appInfo = $indexService->getAppInfo(); $serverInfo = $indexService->getServerInfo(); + $releases = $indexService->getReleases(); $this->view->setVar('global_stat', $globalStat); $this->view->setVar('today_stat', $todayStat); $this->view->setVar('app_info', $appInfo); $this->view->setVar('server_info', $serverInfo); + $this->view->setVar('releases', $releases); } /** diff --git a/app/Http/Admin/Services/Index.php b/app/Http/Admin/Services/Index.php index cf89b904..9febad0f 100644 --- a/app/Http/Admin/Services/Index.php +++ b/app/Http/Admin/Services/Index.php @@ -6,6 +6,7 @@ use App\Caches\SiteGlobalStat; use App\Caches\SiteTodayStat; use App\Library\AppInfo; use App\Library\Utils\ServerInfo; +use GuzzleHttp\Client; class Index extends Service { @@ -52,4 +53,17 @@ class Index extends Service return $cache->get(); } + public function getReleases() + { + $url = 'https://koogua.com/api-releases.json'; + + $client = new Client(); + + $response = $client->get($url, ['timeout' => 3]); + + $content = json_decode($response->getBody(), true); + + return $content['releases'] ?? []; + } + } diff --git a/app/Http/Admin/Views/index/index.volt b/app/Http/Admin/Views/index/index.volt index a676fc79..fd48a48a 100644 --- a/app/Http/Admin/Views/index/index.volt +++ b/app/Http/Admin/Views/index/index.volt @@ -63,7 +63,7 @@