Skip to content

Commit

Permalink
local
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangjianan committed Jun 21, 2024
1 parent 9f88f27 commit 8f06f39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 50 deletions.
34 changes: 1 addition & 33 deletions static/site/js/defer.2.2.2.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,36 +181,4 @@ if (localStorage.getItem('is_show_disclaimer') == 1) {
}
$('#DisclaimerClose').click(() => {
localStorage.setItem('is_show_disclaimer', 0);
});

// MD5校验 & 通过后端API更新json
setTimeout(() => {
let local_web_list_md5 = localStorage.getItem('web_list_md5');
// 后端接口获取最新MD5
let new_md5 = '';
$.ajaxSettings.async = false;
$.ajax({
type: "POST",
url: 'https://lkszj.info/api/get_web_json_md5',
error: (res) => {
},
success: (res) => {
new_md5 = res;
}
});
$.ajaxSettings.async = true;

if (local_web_list_md5 !== new_md5){
// 后端接口获取 web_list
$.ajax({
type: "POST",
url: 'https://lkszj.info/api/get_web_json',
error: (res) => {
},
success: (res) => {
localStorage.setItem('web_list', JSON.stringify(res));
localStorage.setItem('web_list_md5', new_md5);
}
});
}
}, 666);
});
18 changes: 1 addition & 17 deletions static/site/js/index.2.2.2.js

Large diffs are not rendered by default.

0 comments on commit 8f06f39

Please sign in to comment.