diff --git a/pages/score/index.js b/pages/score/index.js index 74672ec..6330f12 100644 --- a/pages/score/index.js +++ b/pages/score/index.js @@ -38,6 +38,9 @@ Page({ tab_date: [{ id: 1, name: '昨日' + }, { + id: 3, + name: '本月' }, { id: 2, name: '上月' @@ -217,12 +220,13 @@ Page({ }] }; let params = {} + params['day_type'] = this.data.tab_date_cur _.apiQuery.appRadar(params).then(res => { - lineChartData.radar.indicator = res.data.indicator - lineChartData.series[0].data[0].value = res.data.series_value - this.setData({ - showLineChart: true, - ['ecLine.onInit']: lineChart, + lineChartData.radar.indicator = res.data.indicator + lineChartData.series[0].data[0].value = res.data.series_value + this.setData({ + showLineChart: true, + ['ecLine.onInit']: lineChart, }) }) }, @@ -250,6 +254,7 @@ Page({ } this.getScore() this.getScoreLists() + this.getChartsData() }, //切换排行类型 changeRankTab(e) {