diff --git a/BFVStatus-vue/src/components/ChartsView.vue b/BFVStatus-vue/src/components/ChartsView.vue index db310a0..24b3232 100644 --- a/BFVStatus-vue/src/components/ChartsView.vue +++ b/BFVStatus-vue/src/components/ChartsView.vue @@ -6,12 +6,13 @@ + 更新于{{lastUpdateTime}} - + @@ -76,6 +77,7 @@ export default { maxKillsLen: 30, selectedSpmDays: 30, maxSpmLen: 30, + isGetDataSuccessfully: true, kdLineOption: { itemStyle: { color: '#409EFF' @@ -260,12 +262,18 @@ export default { thisView.playerHistory = JSON.parse(res) thisView.$store.commit('setHistory', res) thisView.historyLoading = false - thisView.setMaxLen() - thisView.setInitSelectedValue() - thisView.kdDataInit() - thisView.killsDataInit() - thisView.spmDataInit() - thisView.drawKDLineChart() + if (JSON.stringify(thisView.playerHistory.data.series) !== '{}') { + thisView.isGetDataSuccessfully = true + thisView.setMaxLen() + thisView.setInitSelectedValue() + thisView.kdDataInit() + thisView.killsDataInit() + thisView.spmDataInit() + thisView.drawKDLineChart() + } else { + thisView.isGetDataSuccessfully = false + console.log('error') + } } var onError = function (res) { thisView.historyLoading = false diff --git a/BFVStatus-vue/src/components/Loading.vue b/BFVStatus-vue/src/components/Loading.vue index 8125f05..9d1cfe8 100644 --- a/BFVStatus-vue/src/components/Loading.vue +++ b/BFVStatus-vue/src/components/Loading.vue @@ -1,6 +1,9 @@