sys.js
378 Bytes
export default {
state() {
return {
isInBackgound: false
}
},
mutations: {
SET_BACKGROUND_STATE(state, value) {
state.isInBackgound = value
}
},
actions: {
setBackgroundState({ commit }, value) {
uni.$logger.local.info(`【==== ${['切回', '切出'][+value]} ====】 APP`)
commit('SET_BACKGROUND_STATE', value)
}
}
}