Browse Source

更新内容

moshaorui 1 month ago
parent
commit
d59f71910b
1 changed files with 13 additions and 2 deletions
  1. 13 2
      public/static/js/script.js

+ 13 - 2
public/static/js/script.js

@@ -261,7 +261,7 @@ $(document).ready(function() {
                 url: '/download-status',
                 method: 'GET',
                 dataType: 'json',
-                data: { reset: 1 },
+                data: { reset: 0 },
                 success: function(response) {
                     console.log(response);
                     if (response.status == 0 || response.status == 2) {
@@ -350,7 +350,17 @@ $(document).ready(function() {
             window.location.href = url;
             console.log(url);
             loadIndex = layer.load(2, { shade: [0.8, '#000'] });
-            checkDownloadStatus();
+            $.ajax({
+                url: '/download-status',
+                method: 'GET',
+                dataType: 'json',
+                data: { reset: 0 },
+                success: function(response) {
+                    if (response.status == 0 || response.status == 2) {
+                        checkDownloadStatus();
+                    }
+                }
+            });
         });
     });
 
@@ -459,6 +469,7 @@ $(document).ready(function() {
             url: '/download-status',
             method: 'GET',
             dataType: 'json',
+            data: { reset: 0 },
             success: function(response) {
                 if (response.status == 0 || response.status == 2) {
                     downdHref();