fix: 重启后立即读库展示持仓,CTP异步重连不再阻塞
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -111,6 +111,10 @@
|
||||
|
||||
function savePosCache(data) {
|
||||
try {
|
||||
if (!data || !data.rows || !data.rows.length) {
|
||||
var prev = loadPosCache();
|
||||
if (prev && prev.rows && prev.rows.length) return;
|
||||
}
|
||||
sessionStorage.setItem(POS_CACHE_KEY, JSON.stringify(data));
|
||||
} catch (e) { /* quota */ }
|
||||
}
|
||||
@@ -947,6 +951,7 @@
|
||||
}
|
||||
pollPositions();
|
||||
connectPositionStream();
|
||||
requestCtpConnect(false);
|
||||
connectRecommendStream();
|
||||
fetch('/api/recommend/list')
|
||||
.then(function (r) { return r.json(); })
|
||||
|
||||
Reference in New Issue
Block a user