mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-05 04:44:13 +00:00
feat: 增加获取更新日志接口,更改前端页面默认请求地址
This commit is contained in:
parent
4b62aa04aa
commit
a6d9617e7f
@ -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,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</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;
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user