sys.js 678 Bytes
export default {
  state() {
    return {
      isInBackgound: false,
      indexMessagePopupStatus: true, // 首页弹窗状态
    }
  },
  mutations: {
    SET_BACKGROUND_STATE(state, value) {
      state.isInBackgound = value
    },
    SET_INDEX_MESSAGE_POPUP_STATUS(state, value){
      state.indexMessagePopupStatus = value
    }
  },
  actions: {
    setBackgroundState({ commit }, value) {
      uni.$logger.local.info(`【==== ${['切回', '切出'][+value]} ====】 APP`)
      commit('SET_BACKGROUND_STATE', value)
    },

    setIndexMessagePopupStatus({ commit }, value){
      commit('SET_INDEX_MESSAGE_POPUP_STATUS', value)
    }
  }
}