store/index.js
@@ -4,23 +4,27 @@ const store = new Vuex.Store({ state: { // 定义cid默认值 cid: null // 设备唯一标识,推送使用 clientPushId: null, }, mutations: { setCid(state, cid) { state.cid = cid; setClientPushId(state, clientPushId) { state.clientPushId = clientPushId; }, }, actions: { setCid({ commit }, cid) { commit('setCid', cid); setClientPushId({ commit }, clientPushId) { commit('setClientPushId', clientPushId); }, }, getters: { getCid(state) { return state.cid; } getClientPushId(state) { return state.clientPushId; }, } });