| 1234567891011121314151617181920212223 |
- import {login_types,state,mutations,actions,getters} from "./login";
- import login from "./login";
- export const modules = {
- index: {
- actions : {
- async nuxtServerInit ({ commit }, { req }) {
- console.log('nuxtServerInit');
- if(req.session){
- if (req.session.owner) {
- commit('login/'+login_types.mutations.userLogin, req.session.owner)
- }
- if (req.session.captcha) {
- // 更新login 模块的captcha
- commit('login/'+login_types.mutations.SET_CAPTCHA, req.session.captcha)
- }
- }
- },
- }
- },
- login
- }
|