export default { SET_TOKEN(state, token) { state.token = token uni.setStorageSync('token', token) }, REMOVE_TOKEN(state) { state.token = null uni.removeStorageSync('token') }, SET_USER_INFO(state, userInfo) { state.userInfo = userInfo uni.setStorageSync('userInfo') }, REMOVE_USER_INFO(state) { state.userInfo = null uni.removeStorageSync('userInfo') }, SET_CONFIG(state, config) { state.config = config uni.setStorageSync('config') }, GET_CONFIG(state) { state.config = null uni.removeStorageSync('config') }, LOGOUT() { this.commit('REMOVE_TOKEN') this.commit('REMOVE_USER_INFO') } }