feat: delete sys msg

This commit is contained in:
bggRGjQaUbCoE
2024-09-30 11:20:51 +08:00
parent 85db70aaad
commit 161d3244ba
4 changed files with 68 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ class SysMsgController extends GetxController {
return false;
}
}
Future onLoad() async {
if (isEnd) return;
queryMsgFeedSysMsg();
@@ -60,4 +61,14 @@ class SysMsgController extends GetxController {
cursorTime = -1;
queryMsgFeedSysMsg();
}
Future onRemove(int index) async {
var res = await MsgHttp.removeSysMsg(msgFeedSysMsgList[index].id);
if (res['status']) {
msgFeedSysMsgList.removeAt(index);
SmartDialog.showToast('删除成功');
} else {
SmartDialog.showToast(res['msg']);
}
}
}