2020-07-02 23:45:27 +08:00
|
|
|
export const state = () => {
|
|
|
|
return {
|
|
|
|
activeMenu: 'index'
|
|
|
|
}
|
|
|
|
}
|
2020-06-22 17:13:42 +08:00
|
|
|
export const actions = {
|
2020-06-21 21:56:34 +08:00
|
|
|
nuxtServerInit(store, {req}) {
|
|
|
|
// 初始化时的全局任务
|
|
|
|
const initFetchAppData = [
|
|
|
|
// 内容数据
|
|
|
|
store.dispatch('article/fetchList')
|
|
|
|
]
|
|
|
|
return Promise.all(initFetchAppData)
|
2020-06-19 17:10:44 +08:00
|
|
|
}
|
2020-06-22 17:13:42 +08:00
|
|
|
}
|