通话记录展示

This commit is contained in:
GYJ
2024-11-23 16:53:30 +08:00
parent a82e726d5f
commit 0f3e728a79
11 changed files with 343 additions and 14 deletions

View File

@@ -1,5 +1,8 @@
import 'package:cashier_reserve/common/base/ui_model.dart';
import 'package:cashier_reserve/common/channel/call_log_model.dart';
import 'package:cashier_reserve/common/channel/channel_manager.dart';
import 'package:cashier_reserve/common/manager/event_manager.dart';
import 'package:cashier_reserve/common/print/print.dart';
class ReserveViewModel extends BaseUIModel {
Map<int, String> weekdayMap = {
@@ -17,10 +20,22 @@ class ReserveViewModel extends BaseUIModel {
1: "",
2: "",
};
List<CallLogModel?>? callLogs = [];
// ReserveViewModel() {
// loadData();
// }
ReserveViewModel() {
EventManager.addListener<GetCallLogEvent>(this, (event) {
if (event.isSuccess) {
if (!event.isSuccess) {
return;
}
callLogs = event.callLogs;
notifyListeners();
}
});
loadCallLog();
}
void loadCallLog() {
ChannelManager.getCallLog("getCallLog");