加入教程数据统计

This commit is contained in:
marvzhang
2020-02-01 18:00:33 +08:00
parent 95c1be610b
commit acfbcad75c
13 changed files with 100 additions and 13 deletions

View File

@@ -15,6 +15,7 @@ import site from './modules/site'
import stats from './modules/stats'
import setting from './modules/setting'
import version from './modules/version'
import tour from './modules/tour'
import getters from './getters'
Vue.use(Vuex)
@@ -35,6 +36,7 @@ const store = new Vuex.Store({
site,
setting,
version,
tour,
// 统计
stats
},

View File

@@ -0,0 +1,34 @@
const state = {
tourFinishSteps: {
'spider-list': 3,
'spider-list-add': 8,
'spider-detail': 9,
'spider-detail-config': 12,
'task-list': 4,
'task-detail': 7,
'node-detail': 4,
'schedule-list': 1,
'schedule-list-add': 8,
'setting': 2
},
tourSteps: {}
}
const getters = {}
const mutations = {
SET_TOUR_STEP: (state, payload) => {
const { tourName, step } = payload
state.tourSteps[tourName] = step
}
}
const actions = {}
export default {
namespaced: true,
state,
getters,
mutations,
actions
}