Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

polysoft-nafmii / polysoft-h5

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • polysoft-h5
  • src
  • store
  • modules
  • user.js
  • fanx's avatar
    代码提价 · 44838cff
    fanx committed May 13, 2021
    44838cff Browse Files
user.js 423 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
export default {
  namespaced: true,
  state: {
    userId: ''
  },
  mutations: {
    MStoreUserId(state, data) {
      Object.assign(state, data)
    },
  },
  actions: {
    AStoreUserInfo({ commit }, userInfo) {
      commit("MStoreUserId", userInfo)
    }
  },
  getters: {
    // 是否登录
    GIsLogin: (state) => {
      // console.log('state', state.userId)
      return state.userId ? true : false
    }
  }
}