Commit ab206215 authored by afc163's avatar afc163

clear notices count

parent cedd92c5
......@@ -21,6 +21,13 @@ export default {
payload: data,
});
},
*clearNotices(_, { put, select }) {
const count = yield select(state => state.global.notices.length);
yield put({
type: 'user/changeNotifyCount',
payload: count,
});
},
},
reducers: {
......
......@@ -53,5 +53,14 @@ export default {
currentUser: action.payload,
};
},
changeNotifyCount(state, action) {
return {
...state,
currentUser: {
...state.currentUser,
notifyCount: action.payload,
},
};
},
},
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment