|
@@ -257,18 +257,18 @@ $(document).ready(function() {
|
|
var checkDownloadStatus = function() {
|
|
var checkDownloadStatus = function() {
|
|
var intervalId = setInterval(function() {
|
|
var intervalId = setInterval(function() {
|
|
console.log('checkDownloadStatus ....');
|
|
console.log('checkDownloadStatus ....');
|
|
-
|
|
+ $.ajax({
|
|
-
|
|
+ url: '/download-status',
|
|
-
|
|
+ method: 'GET',
|
|
-
|
|
+ dataType: 'json',
|
|
-
|
|
+ success: function(response) {
|
|
-
|
|
+ console.log(response);
|
|
-
|
|
+ if (response.status == 0 || response.status == 2) {
|
|
-
|
|
+ clearInterval(intervalId);
|
|
-
|
|
+ layer.close(loadIndex);
|
|
-
|
|
+ }
|
|
-
|
|
+ }
|
|
-
|
|
+ });
|
|
}, 1000);
|
|
}, 1000);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -459,7 +459,7 @@ $(document).ready(function() {
|
|
method: 'GET',
|
|
method: 'GET',
|
|
dataType: 'json',
|
|
dataType: 'json',
|
|
success: function(response) {
|
|
success: function(response) {
|
|
- if (response.status == 0) {
|
|
+ if (response.status == 0 || response.status == 2) {
|
|
downdHref();
|
|
downdHref();
|
|
checkDownloadStatus();
|
|
checkDownloadStatus();
|
|
}
|
|
}
|