export default {
  namespaced: true,
  state: {
    menus: [], // 菜单
    token: "",
    siteId: "", // 站点id
    deptList: [], // 部门列表
    userInfo: {}, // 用户信息
    sysName: "", // 系统名称
    sysLogo: "", // 系统logo
    path: "", // 门户跳转过来的路由
  },
  getters: {
    siteId(state) {
      return state.siteId;
    },
    deptList(state) {
      return state.deptList;
    },
    userInfo(state) {
      return state.userInfo;
    },
    token(state) {
      return state.token;
    },
    path(state) {
      return state.path;
    },
  },
  mutations: {
    SET_path(state, path) {
      state.path = path;
    },
    SET_menus(state, menus) {
      state.menus = menus;
    },
    SET_siteId(state, siteId) {
      state.siteId = siteId;
    },
    SET_deptList(state, deptList) {
      state.deptList = deptList;
    },
    SET_userInfo(state, userInfo) {
      state.userInfo = userInfo;
    },
    SET_sysName(state, sysName) {
      state.sysName = sysName;
    },
    SET_sysLogo(state, sysLogo) {
      state.sysLogo = sysLogo;
    },
    SET_token(state, token) {
      state.token = token;
    },

    // 重置所有仓库状态
    reset: () => {},
  },
  actions: {},
};
