From a6d9617e7fc64d4a3455f02d8ac3cea924800944 Mon Sep 17 00:00:00 2001 From: gwok Date: Fri, 14 Jul 2023 21:46:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97=E6=8E=A5=E5=8F=A3=EF=BC=8C?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E8=AF=B7=E6=B1=82=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/SystemController.php | 11 ++++------- public/site/en/download.html | 2 +- public/site/en/log.html | 4 ++-- public/site/zh/download.html | 4 ++-- public/site/zh/log.html | 2 +- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/app/Http/Controllers/Api/SystemController.php b/app/Http/Controllers/Api/SystemController.php index e8f098f9f..c8a1271c0 100755 --- a/app/Http/Controllers/Api/SystemController.php +++ b/app/Http/Controllers/Api/SystemController.php @@ -881,18 +881,18 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/get/showitem 19. 首页显示ITEM + * @api {get} api/system/get/updatelog 19. 获取更新日志 * - * @apiDescription 用于判断首页是否显示:pro、github、更新日志... + * @apiDescription 获取更新日志 * @apiVersion 1.0.0 * @apiGroup system - * @apiName get__showitem + * @apiName get__updatelog * * @apiSuccess {Number} ret 返回状态码(1正确、0错误) * @apiSuccess {String} msg 返回信息(错误描述) * @apiSuccess {Object} data 返回数据 */ - public function get__showitem() + public function get__updatelog() { $logPath = base_path('CHANGELOG.md'); $logContent = ""; @@ -905,10 +905,7 @@ class SystemController extends AbstractController } } return Base::retSuccess('success', [ - 'pro' => str_contains(Request::getHost(), "dootask.com") || str_contains(Request::getHost(), "127.0.0.1"), - 'github' => env('GITHUB_URL') ?: false, 'updateLog' => $logContent ?: false, - 'updateVer' => $logVersion, ]); } diff --git a/public/site/en/download.html b/public/site/en/download.html index 1309c813d..565f6376c 100644 --- a/public/site/en/download.html +++ b/public/site/en/download.html @@ -365,7 +365,7 @@ animateBoxes(); const logsItem = getItem('logs_dowmload_en') const updates = document.getElementById('releases'); if(!logsItem) { - const url = "http://192.168.100.122:2222/api/system/get/showitem" + const url = "https://www.dootask.com/api/system/get/updatelog" axios.get(url).then(res=>{ const changelog=res.data.data.updateLog const regex = /## \[(.*?)\]\n([\s\S]*?)(?=\n\n## \[|$)/g; diff --git a/public/site/en/log.html b/public/site/en/log.html index 048f4b373..52b333cc0 100644 --- a/public/site/en/log.html +++ b/public/site/en/log.html @@ -350,7 +350,7 @@ function domHandle (html){ } const logs = getItem('logs') if(!logs) { - const url = "http://192.168.100.122:2222/api/system/get/showitem" + const url = "https://www.dootask.com/api/system/get/updatelog" axios.get(url).then(res=>{ const changelog=res.data.data.updateLog const md = new markdownit(); @@ -385,7 +385,7 @@ document.addEventListener("DOMContentLoaded", function() { } }); } - + }); diff --git a/public/site/zh/download.html b/public/site/zh/download.html index 159b61a93..17925c0fe 100644 --- a/public/site/zh/download.html +++ b/public/site/zh/download.html @@ -326,7 +326,7 @@ window.onload = function(){ const logsItem = getItem('logs_dowmload_zh') const updates = document.getElementById('releases'); if(!logsItem) { - const url = "http://192.168.100.122:2222/api/system/get/showitem" + const url = "https://www.dootask.com/api/system/get/updatelog" axios.get(url).then(res=>{ const changelog=res.data.data.updateLog const regex = /## \[(.*?)\]\n([\s\S]*?)(?=\n\n## \[|$)/g; @@ -399,7 +399,7 @@ animateBoxes(); const logsItem = getItem('logs_dowmload_zh') const updates = document.getElementById('releases'); if(!logsItem) { - const url = "http://192.168.100.122:2222/api/system/get/showitem" + const url = "https://www.dootask.com/api/system/get/updatelog" axios.get(url).then(res=>{ const changelog=res.data.data.updateLog const regex = /## \[(.*?)\]\n([\s\S]*?)(?=\n\n## \[|$)/g; diff --git a/public/site/zh/log.html b/public/site/zh/log.html index 5c4821027..ae7ad438c 100644 --- a/public/site/zh/log.html +++ b/public/site/zh/log.html @@ -350,7 +350,7 @@ const domHandle = (html)=>{ } const logs = getItem('logs') if(!logs) { - const url = "http://192.168.100.122:2222/api/system/get/showitem" + const url = "https://www.dootask.com/api/system/get/updatelog" axios.get(url).then(res=>{ const changelog=res.data.data.updateLog const md = new markdownit();