diff --git a/pages/home/index.js b/pages/home/index.js index fd7af37..59f0113 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -34,6 +34,8 @@ Page({ weightData: [], heightChart: null, weightChart: null, + directChart: null, + indirectChart: null, carList: [], carLength: 0, userInfo: {}, @@ -145,6 +147,14 @@ Page({ this.weightChart.dispose(); this.weightChart = null; } + if (this.directChart) { + this.directChart.dispose(); + this.directChart = null; + } + if (this.indirectChart) { + this.indirectChart.dispose(); + this.indirectChart = null; + } }, // 初始化身高图表 @@ -318,6 +328,7 @@ Page({ ] }); + this.directChart = chart; return chart; }); } @@ -353,6 +364,7 @@ Page({ ] }); + this.indirectChart = chart; return chart; }); }