
const env = window.env || process.env
export default new Vuex.Store({
  state: {
    projectName: env.VUE_APP_PROJECT_TITLE,
    layoutType: localStorage.getItem("layoutType") || 'fourthMenu',   //布局类型
    user: JSON.parse(sessionStorage.getItem('user')),  //用户信息
    token: sessionStorage.getItem('token'),
    env: env,
    ucLoginUrl: env.VUE_APP_PORT_PROVINCE + "/authentication",   // 用户中心登录接口
    fullscreenLoading: false,
    logoUrl: env.VUE_APP_KEY ? require(`@/assets/img/logo_${env.VUE_APP_KEY}.png`) : '/',
    downloadAndroidAppUrl: env.VUE_APP_KEY=='cs'?'http://app.ccqm.cn:8080/uploadfiles/HHH.H5YUN.NEWSP/3hcloudSP.apk':'http://app.ccqm.cn:8080/uploadfiles/HHH.H5YUN.NEWSP.HLJ/HLJCloud.apk', // Android app 下载地址
    downloadIosAppUrl: 'https://apps.apple.com/mo/app/建协云专属版/id1591917561', // ios app 下载地址
    hideCompanyCategory:env.VUE_APP_HIDE_COMPANY_CATEGORY||false, // 主管端隐藏切换身份（奇怪的需求！）
    systemCode: env.VUE_APP_SYSTEM_CODE
  },
  mutations: {
    projectName (state, payload) {
      state.projectName = payload
    },
    layoutType (state, payload) {
      state.layoutType = payload
    },
    token (state, payload) {
      state.token = payload
    },
    user (state, payload) {
      state.user = payload
    }
  },
  getters: {
  },
  actions: {
  },
  modules: {
  }
})
