优化调整bug

This commit is contained in:
24kycj
2026-06-30 09:18:08 +08:00
parent ce76bb8018
commit 0f26163ad7
5 changed files with 39 additions and 48 deletions
+3 -10
View File
@@ -672,12 +672,9 @@
return j && j.soonType ? j.soonType : (j && j.backBlackPic ? 2 : 1);
}
/** 兼容旧版 .soon:补全 f/b/fo/bo加载时去掉 output 大图字段 */
/** 兼容旧版 .soon:补全 f/b/fo/bo保留生产字段(frontData 等) */
function soonNormalizeSoonJson(j) {
if (!j || typeof j !== 'object') return null;
if (typeof window.soonStripDesign1HeavyFields === 'function') {
window.soonStripDesign1HeavyFields(j);
}
if (!j.f || !j.f.objects || !Array.isArray(j.f.objects)) {
if (j.objects && Array.isArray(j.objects) && j.objects.length > 0) {
j.f = {
@@ -731,12 +728,8 @@
if (!normalized) return null;
var displayName = soonEnsureSoonExt(fileName || 'design.soon');
var key = soonMakeSessionKey(displayName);
var slim = Object.assign({}, normalized);
if (typeof window.soonStripDesign1HeavyFields === 'function') {
window.soonStripDesign1HeavyFields(slim);
}
var payload = '';
try { payload = JSON.stringify(slim); } catch (e) { return null; }
try { payload = JSON.stringify(normalized); } catch (e) { return null; }
try {
sessionStorage.setItem(key, payload);
} catch (e) {
@@ -746,7 +739,7 @@
return null;
}
}
return { key: key, slim: slim, displayName: displayName, normalized: normalized };
return { key: key, slim: normalized, displayName: displayName, normalized: normalized };
}
function soonPutSoonSession(j, fileName) {