From e8a119d00db496fb8eb055ab64c439030f174811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=99=AF=E9=98=B3?= <1656488874@qq.com> Date: Tue, 7 Jan 2020 01:54:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=8E=A7=E5=88=B6=E5=8F=B0=E5=A4=A7?= =?UTF-8?q?=E9=87=8F=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/InfoView/SpiderInfoView.vue | 6 +----- frontend/src/components/Stats/SpiderStats.vue | 8 ++++---- frontend/src/i18n/zh.js | 1 + frontend/src/store/modules/schedule.js | 14 ++++++++------ 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/InfoView/SpiderInfoView.vue b/frontend/src/components/InfoView/SpiderInfoView.vue index 74e48d08..93fa9c12 100644 --- a/frontend/src/components/InfoView/SpiderInfoView.vue +++ b/frontend/src/components/InfoView/SpiderInfoView.vue @@ -51,7 +51,7 @@ - {{$t('Run')}} @@ -69,10 +69,6 @@ {{$t('Upload')}} - - {{$t('Run')}} - {{$t('Save')}} diff --git a/frontend/src/components/Stats/SpiderStats.vue b/frontend/src/components/Stats/SpiderStats.vue index f239f823..f7993e2b 100644 --- a/frontend/src/components/Stats/SpiderStats.vue +++ b/frontend/src/components/Stats/SpiderStats.vue @@ -3,19 +3,19 @@
- - - - diff --git a/frontend/src/i18n/zh.js b/frontend/src/i18n/zh.js index b15efd50..e739b979 100644 --- a/frontend/src/i18n/zh.js +++ b/frontend/src/i18n/zh.js @@ -225,6 +225,7 @@ export default { 'Not Found Spider': '爬虫配置错误', '[minute] [hour] [day] [month] [day of week]': '[分] [时] [天] [月] [星期几]', 'Enable/Disable': '启用/禁用', + 'Cron': 'Cron', // 网站 'Site': '网站', diff --git a/frontend/src/store/modules/schedule.js b/frontend/src/store/modules/schedule.js index 9fde4e84..9e60169c 100644 --- a/frontend/src/store/modules/schedule.js +++ b/frontend/src/store/modules/schedule.js @@ -21,12 +21,14 @@ const actions = { getScheduleList ({ state, commit }) { request.get('/schedules') .then(response => { - commit('SET_SCHEDULE_LIST', response.data.data.map(d => { - const arr = d.cron.split(' ') - arr.splice(0, 1) - d.cron = arr.join(' ') - return d - })) + if (response.data.data) { + commit('SET_SCHEDULE_LIST', response.data.data.map(d => { + const arr = d.cron.split(' ') + arr.splice(0, 1) + d.cron = arr.join(' ') + return d + })) + } }) }, addSchedule ({ state }) {