diff --git a/application/views/cache/update.php b/application/views/cache/update.php
index 59785963..c60e8614 100644
--- a/application/views/cache/update.php
+++ b/application/views/cache/update.php
@@ -1,85 +1,128 @@
+
-更新静态页-v1.0a
-
-
-
-
-
-
+
+
+
+
+ //下拉选站点
+ $('a.sss').on('click', function() {
+ var site = $(this).html();
+ location.href = '/info.php/login/change_site/' + site + '/?url=/cache/update/';
+ });
+
+ //递归ajax
+ function dg_ajax(dom, star, step) {
+ var current = dom.eq(star);
+ if (current.length) {
+ var file = current.find('.file').attr('title');
+ //file = encodeURI(file);
+ current.find('.msg_wait').css('color', 'red').html('更新中');
+ $.ajax({
+ url: '',
+ dataType: 'json',
+ type: 'POST',
+ data: {
+ '': file
+ },
+ success: function(data) {
+ star = star + step;
+ current.find('.msg_wait').css('color', 'blue').html('成功');
+ count_num(num_zero);
+ //console.log(star+''+file);
+ dg_ajax(dom, star, step);
+ },
+ error: function() {
+ current.find('.msg_wait').css('color', 'red').html('重试');
+ dg_ajax(dom, star, step);
+ }
+ });
+ }
+ }
+
+ //计数显示
+ var num_zero = 1;
+
+ function count_num(num) {
+ $('#count_num').html('已更新' + num + '个页面 进度' + (Math.ceil(num * 100 / )) + '% ').show();
+ num_zero++;
+ }
+ });
+
+
-
缓存目录个
-
含文件个
+
缓存目录个
+
含文件个
已更新0个页面 进度0%
更新
@@ -117,31 +162,32 @@ $(function() {
- #SN |
- 文件名 |
- 更新日期 |
- 更新状态 |
+ #SN |
+ 文件名 |
+ 更新日期 |
+ 更新状态 |
- $it) {
- $encode = mb_detect_encoding($it, array('ASCII','GBK','ISO-8859-1','UTF-8'));
+ $it) {
+ $encode = mb_detect_encoding($it, array('ASCII', 'GBK', 'ISO-8859-1', 'UTF-8'));
$_it = mb_convert_encoding($it, 'UTF8', $encode);
?>
-
- |
- 100) { ?>
- .......... |
-
- |
-
- |
- 无操作 |
-
+
+ |
+ 100) { ?>
+ .......... |
+
+ |
+
+ |
+ 无操作 |
+
+
\ No newline at end of file