|
|
@@ -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); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |