|
@@ -233,12 +233,10 @@ const collectHandle = () => {
|
|
|
}).then((res) => {
|
|
|
if (res.Ret === 200) {
|
|
|
state.reportInfo.IsCollect = !state.reportInfo.IsCollect;
|
|
|
- if (state.reportInfo.IsCollection == 1) {
|
|
|
+ if (res.Data.Status == 1) {
|
|
|
state.reportInfo.CollectionNum -= 1;
|
|
|
- state.reportInfo.IsCollection = 0;
|
|
|
} else {
|
|
|
state.reportInfo.CollectionNum += 1;
|
|
|
- state.reportInfo.IsCollection = 1;
|
|
|
}
|
|
|
Toast(res.Msg);
|
|
|
}
|