alarm.js
485 Bytes
const alarm = {
state:{
alarmInfo:'',
faceInfo:''
},
mutations:{
SET_ALARM(state, data) {
console.log(state)
state.alarmInfo = data;
},
SET_FACE(state, data) {
state.faceInfo = data
}
},
actions:{
GetAlarmData({commit,state}, data) {
if (data.type=='request') {
commit('SET_ALARM',data)
}
if (data.type == 'face_img_search') {
commit('SET_FACE',data)
}
}
}
}
export default alarm