fix: update frontend
This commit is contained in:
BIN
app/amazon/__pycache__/approve.cpython-39.pyc
Normal file
BIN
app/amazon/__pycache__/approve.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/amazon/__pycache__/asin_status.cpython-39.pyc
Normal file
BIN
app/amazon/__pycache__/asin_status.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/amazon/__pycache__/base.cpython-39.pyc
Normal file
BIN
app/amazon/__pycache__/base.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/amazon/__pycache__/del_brand.cpython-39.pyc
Normal file
BIN
app/amazon/__pycache__/del_brand.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/amazon/__pycache__/detail_spider.cpython-39.pyc
Normal file
BIN
app/amazon/__pycache__/detail_spider.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/amazon/__pycache__/main.cpython-39.pyc
Normal file
BIN
app/amazon/__pycache__/main.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/amazon/__pycache__/match_action.cpython-39.pyc
Normal file
BIN
app/amazon/__pycache__/match_action.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/amazon/__pycache__/patrol_delete.cpython-314.pyc
Normal file
BIN
app/amazon/__pycache__/patrol_delete.cpython-314.pyc
Normal file
Binary file not shown.
BIN
app/amazon/__pycache__/patrol_delete.cpython-39.pyc
Normal file
BIN
app/amazon/__pycache__/patrol_delete.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/amazon/__pycache__/price_match.cpython-39.pyc
Normal file
BIN
app/amazon/__pycache__/price_match.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/amazon/__pycache__/tool.cpython-39.pyc
Normal file
BIN
app/amazon/__pycache__/tool.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/blueprints/__pycache__/__init__.cpython-39.pyc
Normal file
BIN
app/blueprints/__pycache__/__init__.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/blueprints/__pycache__/admin.cpython-39.pyc
Normal file
BIN
app/blueprints/__pycache__/admin.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/blueprints/__pycache__/auth.cpython-39.pyc
Normal file
BIN
app/blueprints/__pycache__/auth.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/blueprints/__pycache__/brand.cpython-39.pyc
Normal file
BIN
app/blueprints/__pycache__/brand.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/blueprints/__pycache__/communication.cpython-39.pyc
Normal file
BIN
app/blueprints/__pycache__/communication.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/blueprints/__pycache__/image.cpython-39.pyc
Normal file
BIN
app/blueprints/__pycache__/image.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/blueprints/__pycache__/main.cpython-39.pyc
Normal file
BIN
app/blueprints/__pycache__/main.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/brand_spider/__pycache__/main.cpython-39.pyc
Normal file
BIN
app/brand_spider/__pycache__/main.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/brand_spider/__pycache__/web_dec.cpython-39.pyc
Normal file
BIN
app/brand_spider/__pycache__/web_dec.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/tests/__pycache__/conftest.cpython-39-pytest-8.4.2.pyc
Normal file
BIN
app/tests/__pycache__/conftest.cpython-39-pytest-8.4.2.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/tests/__pycache__/test_patrol_delete.cpython-39.pyc
Normal file
BIN
app/tests/__pycache__/test_patrol_delete.cpython-39.pyc
Normal file
Binary file not shown.
BIN
app/tool/__pycache__/devices.cpython-39.pyc
Normal file
BIN
app/tool/__pycache__/devices.cpython-39.pyc
Normal file
Binary file not shown.
@@ -785,24 +785,24 @@
|
||||
else if (status === 'cancelled') showToast('已取消');
|
||||
}
|
||||
|
||||
function verifyTerminalTaskStatus(taskId, expectedStatus) {
|
||||
return fetch('/api/brand/tasks/' + taskId, {
|
||||
credentials: 'include',
|
||||
headers: withUidHeaders({ 'X-Requested-With': 'XMLHttpRequest' })
|
||||
})
|
||||
.then(function(r) { return r.json(); })
|
||||
.then(function(res) {
|
||||
if (!res.success || !res.task) return null;
|
||||
var actualStatus = (res.task.status || '').toLowerCase();
|
||||
if (actualStatus === 'success' || actualStatus === 'failed' || actualStatus === 'cancelled') {
|
||||
return actualStatus;
|
||||
}
|
||||
return null;
|
||||
})
|
||||
.catch(function() { return null; });
|
||||
}
|
||||
|
||||
function pollRunTask(taskId) {
|
||||
function verifyTerminalTaskStatus(taskId, expectedStatus) {
|
||||
return fetch('/api/brand/tasks/' + taskId, {
|
||||
credentials: 'include',
|
||||
headers: withUidHeaders({ 'X-Requested-With': 'XMLHttpRequest' })
|
||||
})
|
||||
.then(function(r) { return r.json(); })
|
||||
.then(function(res) {
|
||||
if (!res.success || !res.task) return null;
|
||||
var actualStatus = (res.task.status || '').toLowerCase();
|
||||
if (actualStatus === 'success' || actualStatus === 'failed' || actualStatus === 'cancelled') {
|
||||
return actualStatus;
|
||||
}
|
||||
return null;
|
||||
})
|
||||
.catch(function() { return null; });
|
||||
}
|
||||
|
||||
function pollRunTask(taskId) {
|
||||
pollTaskId = taskId;
|
||||
var runProgressFill = document.getElementById('runProgressFill');
|
||||
var runProgressText = document.getElementById('runProgressText');
|
||||
@@ -865,18 +865,18 @@
|
||||
break;
|
||||
}
|
||||
} catch (err) {}
|
||||
}
|
||||
|
||||
if (terminalStatus) {
|
||||
var verifiedStatus = await verifyTerminalTaskStatus(taskId, terminalStatus);
|
||||
if (verifiedStatus) {
|
||||
try { runTaskEventAbortController.abort(); } catch (e2) {}
|
||||
runTaskEventAbortController = null;
|
||||
onRunTaskFinished(verifiedStatus);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (terminalStatus) {
|
||||
var verifiedStatus = await verifyTerminalTaskStatus(taskId, terminalStatus);
|
||||
if (verifiedStatus) {
|
||||
try { runTaskEventAbortController.abort(); } catch (e2) {}
|
||||
runTaskEventAbortController = null;
|
||||
onRunTaskFinished(verifiedStatus);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (err) {}
|
||||
})();
|
||||
|
||||
@@ -938,7 +938,7 @@
|
||||
});
|
||||
}
|
||||
tick();
|
||||
pollTimer = setInterval(tick, 3000);
|
||||
pollTimer = setInterval(tick, 3000);
|
||||
}
|
||||
|
||||
document.getElementById('btnRun').onclick = function() {
|
||||
@@ -1148,11 +1148,11 @@
|
||||
});
|
||||
|
||||
loadTasks();
|
||||
setInterval(function() {
|
||||
if (cachedTasks.some(function(t) { return (t.status || '').toLowerCase() === 'running'; })) {
|
||||
loadTasks();
|
||||
}
|
||||
}, 3000);
|
||||
setInterval(function() {
|
||||
if (cachedTasks.some(function(t) { return (t.status || '').toLowerCase() === 'running'; })) {
|
||||
loadTasks();
|
||||
}
|
||||
}, 3000);
|
||||
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener('pywebviewready', function() {
|
||||
|
||||
Reference in New Issue
Block a user