mirror of https://github.com/openspug/spug
F 修复通知未读数量错误计算的问题
parent
5cd87277d5
commit
2f7270cfef
|
@ -46,9 +46,11 @@ export default class extends React.Component {
|
|||
|
||||
handleRead = (e, item) => {
|
||||
e.stopPropagation();
|
||||
this.state.read.push(item.id);
|
||||
this.setState({read: this.state.read});
|
||||
http.patch('/api/notify/', {ids: [item.id]})
|
||||
if (this.state.read.indexOf(item.id) === -1) {
|
||||
this.state.read.push(item.id);
|
||||
this.setState({read: this.state.read});
|
||||
http.patch('/api/notify/', {ids: [item.id]})
|
||||
}
|
||||
};
|
||||
|
||||
handleReadAll = () => {
|
||||
|
|
Loading…
Reference in New Issue