link site to spider

This commit is contained in:
Marvin Zhang
2019-05-10 13:27:13 +08:00
parent 1cd2fd47f3
commit 433b945eeb
4 changed files with 38 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
import request from '../../api/request'
const state = {
tableData: [],
siteList: [],
// filter
filter: {
@@ -21,8 +21,8 @@ const mutations = {
SET_KEYWORD (state, value) {
state.keyword = value
},
SET_TABLE_DATA (state, value) {
state.tableData = value
SET_SITE_LIST (state, value) {
state.siteList = value
},
SET_PAGE_NUM (state, value) {
state.pageNum = value
@@ -52,7 +52,7 @@ const actions = {
}
})
.then(response => {
commit('SET_TABLE_DATA', response.data.items)
commit('SET_SITE_LIST', response.data.items)
commit('SET_TOTAL_COUNT', response.data.total_count)
})
}

View File

@@ -74,7 +74,8 @@ const actions = {
lang: state.spiderForm.lang,
col: state.spiderForm.col,
cron: state.spiderForm.cron,
cron_enabled: state.spiderForm.cron_enabled ? 1 : 0
cron_enabled: state.spiderForm.cron_enabled ? 1 : 0,
site: state.spiderForm.site
})
.then(() => {
dispatch('getSpiderList')
@@ -89,7 +90,8 @@ const actions = {
lang: state.spiderForm.lang,
col: state.spiderForm.col,
cron: state.spiderForm.cron,
cron_enabled: state.spiderForm.cron_enabled ? 1 : 0
cron_enabled: state.spiderForm.cron_enabled ? 1 : 0,
site: state.spiderForm.site
})
.then(() => {
dispatch('getSpiderList')