fix: add console.error to market catch blocks for debugging
This commit is contained in:
@@ -52,7 +52,7 @@ const PageMarket = {
|
|||||||
const installed = localIds.includes(d.manifest_id || d.name) || localNames.includes(d.name);
|
const installed = localIds.includes(d.manifest_id || d.name) || localNames.includes(d.name);
|
||||||
return this._cardHtml(d, isScene, installed);
|
return this._cardHtml(d, isScene, installed);
|
||||||
}).join('');
|
}).join('');
|
||||||
} catch (e) { grid.innerHTML = '<div style="text-align:center;padding:40px;color:var(--danger);">加载失败</div>'; }
|
} catch (e) { console.error(e); grid.innerHTML = '<div style="text-align:center;padding:40px;color:var(--danger);">加载失败: ' + (e.message||'未知') + '</div>'; }
|
||||||
},
|
},
|
||||||
|
|
||||||
async _loadMine(grid) {
|
async _loadMine(grid) {
|
||||||
@@ -71,7 +71,7 @@ const PageMarket = {
|
|||||||
html += '<h3 style="margin:20px 0 10px;font-size:16px;color:var(--text-secondary)">我的场景</h3>' + data.scenes.map(d => this._myCardHtml(d, 'scenes')).join('');
|
html += '<h3 style="margin:20px 0 10px;font-size:16px;color:var(--text-secondary)">我的场景</h3>' + data.scenes.map(d => this._myCardHtml(d, 'scenes')).join('');
|
||||||
}
|
}
|
||||||
grid.innerHTML = html;
|
grid.innerHTML = html;
|
||||||
} catch (e) { grid.innerHTML = '<div style="text-align:center;padding:40px;color:var(--danger);">加载失败</div>'; }
|
} catch (e) { console.error(e); grid.innerHTML = '<div style="text-align:center;padding:40px;color:var(--danger);">加载失败: ' + (e.message||'未知') + '</div>'; }
|
||||||
},
|
},
|
||||||
|
|
||||||
_cardHtml(d, isScene, installed) {
|
_cardHtml(d, isScene, installed) {
|
||||||
|
|||||||
Reference in New Issue
Block a user