图表随容器宽度重绘;刷新数据

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
FANGKK
2026-09-10 17:17:58 +08:00
co-authored by Claude Opus 5
parent e77898bc67
commit a183c0976b
2 changed files with 12 additions and 5 deletions
+3 -3
View File
@@ -1,16 +1,16 @@
{
"updated_at": "2026-09-10T14:40:00+08:00",
"updated_at": "2026-09-10T17:14:00+08:00",
"source": "data_report/list,按日期+订单",
"account": { "id": 11535, "name": "C00000196_TECDO HONG KONG LIMITED" },
"range": { "start": "2026-09-03", "end": "2026-09-09" },
"campaigns": [
{
"id": "3202606240007",
"name": "PendingC00000196_Tecdo_Agc_ArionPlay_APK_PH_CPI_MIX_20260624",
"name": "[Pending]PendingC00000196_Tecdo_Agc_ArionPlay_APK_PH_CPI_MIX_20260624",
"app": "ArionPlay",
"start": "2026-06-24",
"bid": 0.65,
"daily_budget": 100,
"daily_budget": 150,
"lifetime_spend": 3770
},
{
+9 -2
View File
@@ -4,6 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tecdo 消耗与余额</title>
<link rel="icon" href="data:,">
<style>
:root {
color-scheme: light;
@@ -405,8 +406,14 @@ Promise.all([
err.textContent = '数据加载失败:' + e.message;
});
let resizeTimer;
addEventListener('resize', () => { clearTimeout(resizeTimer); resizeTimer = setTimeout(drawCharts, 120); });
let resizeTimer, lastWidth = 0;
new ResizeObserver(entries => {
const w = Math.round(entries[0].contentRect.width);
if (w === lastWidth) return;
lastWidth = w;
clearTimeout(resizeTimer);
resizeTimer = setTimeout(drawCharts, 120);
}).observe(document.querySelector('main'));
</script>
</body>
</html>