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 @@ diff --git a/app/Http/Admin/Views/index/main_app_info.volt b/app/Http/Admin/Views/index/main_app_info.volt index e5199d2e..4dbf67a5 100644 --- a/app/Http/Admin/Views/index/main_app_info.volt +++ b/app/Http/Admin/Views/index/main_app_info.volt @@ -13,7 +13,7 @@ 系统框架 - Phalcon 3.4.5 + Phalcon 3.4.5 获取渠道 diff --git a/app/Http/Admin/Views/index/main_app_trend.volt b/app/Http/Admin/Views/index/main_app_trend.volt index 44cef704..fd4d4684 100644 --- a/app/Http/Admin/Views/index/main_app_trend.volt +++ b/app/Http/Admin/Views/index/main_app_trend.volt @@ -1,6 +1,19 @@
产品动态
- + + + + + + + {% for release in releases %} + + + + + {% endfor %} + +
{{ release.title }}{{ release.date }}
\ No newline at end of file diff --git a/app/Http/Admin/Views/index/main_team_info.volt b/app/Http/Admin/Views/index/main_team_info.volt index c09a7637..85c36e01 100644 --- a/app/Http/Admin/Views/index/main_team_info.volt +++ b/app/Http/Admin/Views/index/main_team_info.volt @@ -9,7 +9,7 @@ 版权所有 - 深圳市酷瓜软件有限公司 + 深圳市酷瓜软件有限公司 产品经理 diff --git a/app/Http/Home/Views/partials/footer.volt b/app/Http/Home/Views/partials/footer.volt index 745f6e85..9ac1d4a5 100644 --- a/app/Http/Home/Views/partials/footer.volt +++ b/app/Http/Home/Views/partials/footer.volt @@ -9,12 +9,12 @@ {% if site_info.copyright %} © {{ site_info.copyright }} {% endif %} - Powered by {{ app_info.alias }} {{ app_info.version }} + Powered by {{ app_info.alias }} {{ app_info.version }} {% if site_info.icp_sn %} - {{ site_info.icp_sn }} + {{ site_info.icp_sn }} {% endif %} {% if site_info.police_sn %} - {{ site_info.police_sn }} + {{ site_info.police_sn }} {% endif %} diff --git a/app/Library/AppInfo.php b/app/Library/AppInfo.php index f130a713..945913fc 100644 --- a/app/Library/AppInfo.php +++ b/app/Library/AppInfo.php @@ -9,7 +9,7 @@ class AppInfo protected $alias = 'CTC'; - protected $link = 'https://gitee.com/koogua'; + protected $link = 'https://koogua.com'; protected $version = '1.2.4';