diff --git a/src/admin/templets/index_body.htm b/src/admin/templets/index_body.htm index 95c94137..56538101 100644 --- a/src/admin/templets/index_body.htm +++ b/src/admin/templets/index_body.htm @@ -177,6 +177,10 @@
+
+ + +
diff --git a/src/static/web/js/admin.update.js b/src/static/web/js/admin.update.js index f0b8ca09..fd4497e4 100644 --- a/src/static/web/js/admin.update.js +++ b/src/static/web/js/admin.update.js @@ -126,5 +126,23 @@ $(document).ready(function() { $("#btnOK").click(function() { hasNewVersion(); }); - hasNewVersion(); + let shouldCheckUpdate = GetCookie('checkUpdate'); + if (shouldCheckUpdate === null) { + SetCookie('checkUpdate', 'true', 30); + shouldCheckUpdate = 'true'; + } + if (shouldCheckUpdate === 'true') { + hasNewVersion(); + $('#chkUpdate').prop('checked', true); + } else { + $('#chkUpdate').prop('checked', false); + } + // 模态框关闭时根据复选框状态设置 cookie + $('#mdlUpdate').on('hidden.bs.modal', function () { + if ($('#chkUpdate').is(':checked')) { + SetCookie('checkUpdate', 'true', 30); + } else { + SetCookie('checkUpdate', 'false', 30); + } + }); }); \ No newline at end of file diff --git a/src/system/libraries/dedehttpdown.class.php b/src/system/libraries/dedehttpdown.class.php index f2307505..45653805 100755 --- a/src/system/libraries/dedehttpdown.class.php +++ b/src/system/libraries/dedehttpdown.class.php @@ -361,8 +361,8 @@ class DedeHttpDown if (count($headers) > 0) { curl_setopt($this->m_ch, CURLOPT_HTTPHEADER, $headers); } - curl_setopt($this->m_ch, CURLOPT_CONNECTTIMEOUT, 20); - curl_setopt($this->m_ch, CURLOPT_TIMEOUT, 900); + curl_setopt($this->m_ch, CURLOPT_CONNECTTIMEOUT, 7); + curl_setopt($this->m_ch, CURLOPT_TIMEOUT, 10); $this->m_html = curl_exec($this->m_ch); $status = curl_getinfo($this->m_ch); if (count($status) > 0) {