// import Cookies from 'js-cookie'
// import { getConfig } from '@/api/login'
import { getRem } from '../../utils/auth'

const state = {
  rem: getRem(), // 1rem等于多少px
  // kaptcha: '', // 验证码
  // sid: '' // sid
}
const mutations = {
  SET_REM: (state, rem)=>{
    state.rem = rem
  }
}

const actions = {
  ToggleDevice({ commit }, device) {
    commit('TOGGLE_DEVICE', device)
  },
  // 设置rem
  SetRem({commit}, rem){
    commit('SET_REM', rem)
  }
}

export default {
  namespace: true,
  state,
  mutations,
  actions
}
