2019-09-20 22:34:39 +08:00
|
|
|
var index = getQueryString('i');
|
2019-09-20 12:31:47 +08:00
|
|
|
$.ajax({
|
|
|
|
type: "GET",
|
2019-09-20 22:34:39 +08:00
|
|
|
url: "content.json?timestamp=" + (new Date()).valueOf(),
|
2019-09-20 12:31:47 +08:00
|
|
|
dataType: "json",
|
|
|
|
success: function (response) {
|
|
|
|
var lastIndex = response.length - 1;
|
2019-09-20 22:34:39 +08:00
|
|
|
|
2019-10-19 21:56:07 +08:00
|
|
|
if (response.length <= index) {
|
2019-09-21 16:07:59 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-09-20 22:34:39 +08:00
|
|
|
listContent(response, lastIndex);
|
2019-09-20 12:31:47 +08:00
|
|
|
|
2022-09-24 22:32:41 +08:00
|
|
|
if (response[lastIndex]['type']=='html') {
|
|
|
|
$.ajax({
|
|
|
|
type: "GET",
|
|
|
|
url: 'content/html/' + response[lastIndex]['date'] + '.html',
|
|
|
|
success: function (res) {
|
|
|
|
appendContent(res);
|
|
|
|
},
|
|
|
|
error: function () {
|
|
|
|
message.alert('出错了!', '网络连接出错了,请稍后再试');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2019-09-21 16:17:12 +08:00
|
|
|
},
|
2019-10-19 21:56:07 +08:00
|
|
|
error: function () {
|
|
|
|
message.alert('出错了!', '网络连接出错了,请稍后再试');
|
2019-09-20 12:31:47 +08:00
|
|
|
}
|
|
|
|
});
|